summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author Julian Sikorski <belegdol+github@gmail.com>2022-06-25 18:35:01 +0200
committer GitHub <noreply@github.com>2022-06-25 12:35:01 -0400
commit83942438729ec7e4e4966a6bd271320a679fafc2 (patch)
tree916823cb81631ddd0d4c9e46263e28015de96cea /src/osd
parent9956c942da645ad53cb976459d715d71dd07781f (diff)
Throw a fatal error if combination of bgfx video and wayland videodriver has been detected (#9888)
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/sdl/sdlmain.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp
index 7759dd3f698..b99858dd69e 100644
--- a/src/osd/sdl/sdlmain.cpp
+++ b/src/osd/sdl/sdlmain.cpp
@@ -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();