summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Julian Sikorski <belegdol+github@gmail.com>2022-05-03 15:52:19 +0200
committer GitHub <noreply@github.com>2022-05-03 09:52:19 -0400
commit67bcf18c407e8700b34cc3a53a0b5ed318e7a419 (patch)
tree030dee9a7e827b0da1fc9b225483e1c5dbe955fe /src
parent11923fafc2a9ad6ca662d15367805a78f617c2f7 (diff)
Prefer the X11 SDL video driver on Linux (#9676)
Diffstat (limited to 'src')
-rw-r--r--src/osd/sdl/sdlmain.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index 1a65e48a846..3c57faeddbb 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -437,10 +437,21 @@ void sdl_osd_interface::init(running_machine &machine)
}
stemp = options().video_driver();
- if (stemp != nullptr && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
+ if (stemp != nullptr)
{
- osd_printf_verbose("Setting SDL videodriver '%s' ...\n", stemp);
- osd_setenv(SDLENV_VIDEODRIVER, stemp, 1);
+ if (strcmp(stemp, OSDOPTVAL_AUTO) != 0)
+ {
+ osd_printf_verbose("Setting SDL videodriver '%s' ...\n", stemp);
+ osd_setenv(SDLENV_VIDEODRIVER, stemp, 1);
+ }
+ else
+ {
+#if defined(__linux__)
+ // bgfx does not work with wayland
+ osd_printf_verbose("Setting SDL videodriver '%s' ...\n", "x11");
+ osd_setenv(SDLENV_VIDEODRIVER, "x11", 1);
+#endif
+ }
}
stemp = options().render_driver();