Prefer the X11 SDL video driver on Linux (#9676)

This commit is contained in:
Julian Sikorski 2022-05-03 15:52:19 +02:00 committed by GitHub
parent 11923fafc2
commit 67bcf18c40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();