mirror of
https://github.com/libretro/RetroArch
synced 2025-03-18 13:20:57 +00:00
Get the SDL2 video driver to work in Wayland/KMS
This commit is contained in:
parent
2520337ddc
commit
125154e831
@ -440,10 +440,16 @@ static void *sdl2_gfx_init(const video_info_t *video,
|
||||
|
||||
#if defined(_WIN32)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_WIN32);
|
||||
#elif defined(HAVE_X11)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_X11);
|
||||
#elif defined(HAVE_COCOA)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_OSX);
|
||||
#else
|
||||
const char *video_driver = SDL_GetCurrentVideoDriver();
|
||||
if (strcmp(video_driver, "x11") == 0)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_X11);
|
||||
else if (strcmp(video_driver, "wayland") == 0)
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_WAYLAND);
|
||||
else
|
||||
sdl2_set_handles(vid->window, RARCH_DISPLAY_NONE);
|
||||
#endif
|
||||
|
||||
sdl_refresh_viewport(vid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user