mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(SDL2) Add ifdefs for HAVE_X11 and HAVE_WAYLAND
This commit is contained in:
parent
6aa01b2ce7
commit
732fce9a04
@ -443,12 +443,19 @@ static void *sdl2_gfx_init(const video_info_t *video,
|
||||
#elif defined(HAVE_COCOA)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_OSX);
|
||||
#else
|
||||
#if defined(HAVE_X11) || defined(HAVE_WAYLAND)
|
||||
const char *video_driver = SDL_GetCurrentVideoDriver();
|
||||
#endif
|
||||
#ifdef HAVE_X11
|
||||
if (strcmp(video_driver, "x11") == 0)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_X11);
|
||||
else if (strcmp(video_driver, "wayland") == 0)
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (strcmp(video_driver, "wayland") == 0)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_WAYLAND);
|
||||
else
|
||||
#endif
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_NONE);
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user