(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)
|
#elif defined(HAVE_COCOA)
|
||||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_OSX);
|
sdl2_set_handles(vid->window, RARCH_DISPLAY_OSX);
|
||||||
#else
|
#else
|
||||||
|
#if defined(HAVE_X11) || defined(HAVE_WAYLAND)
|
||||||
const char *video_driver = SDL_GetCurrentVideoDriver();
|
const char *video_driver = SDL_GetCurrentVideoDriver();
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_X11
|
||||||
if (strcmp(video_driver, "x11") == 0)
|
if (strcmp(video_driver, "x11") == 0)
|
||||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_X11);
|
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);
|
sdl2_set_handles(vid->window, RARCH_DISPLAY_WAYLAND);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_NONE);
|
sdl2_set_handles(vid->window, RARCH_DISPLAY_NONE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue