mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
Throw a fatal error if combination of bgfx video and wayland videodriver has been detected (#9888)
This commit is contained in:
parent
9956c942da
commit
8394243872
@ -437,21 +437,10 @@ void sdl_osd_interface::init(running_machine &machine)
|
||||
}
|
||||
|
||||
stemp = options().video_driver();
|
||||
if (stemp != nullptr)
|
||||
if (stemp != nullptr && strcmp(stemp, OSDOPTVAL_AUTO) != 0)
|
||||
{
|
||||
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
|
||||
}
|
||||
osd_printf_verbose("Setting SDL videodriver '%s' ...\n", stemp);
|
||||
osd_setenv(SDLENV_VIDEODRIVER, stemp, 1);
|
||||
}
|
||||
|
||||
stemp = options().render_driver();
|
||||
@ -510,6 +499,11 @@ void sdl_osd_interface::init(running_machine &machine)
|
||||
osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// bgfx does not work with wayland
|
||||
if ((strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0) && ((strcmp(options().video(), "auto") == 0) || (strcmp(options().video(), "bgfx") == 0)))
|
||||
fatalerror("Error: BGFX video does not work with wayland videodriver. Please change either of the options.");
|
||||
|
||||
osd_sdl_info();
|
||||
|
||||
defines_verbose();
|
||||
|
Loading…
Reference in New Issue
Block a user