From 55d123d95a19f05e4e9b09b54937d5dc05b53b18 Mon Sep 17 00:00:00 2001 From: orbea Date: Tue, 15 Oct 2019 09:09:22 -0700 Subject: [PATCH] Fix build when SDL2 is not built against wayland. Fixes https://github.com/libretro/RetroArch/issues/9583. --- gfx/common/sdl2_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/common/sdl2_common.c b/gfx/common/sdl2_common.c index fd6853f979..5195aa01b9 100644 --- a/gfx/common/sdl2_common.c +++ b/gfx/common/sdl2_common.c @@ -65,7 +65,8 @@ void sdl2_set_handles(void *data, enum rarch_display_type display_type) #endif break; case RARCH_DISPLAY_WAYLAND: -#ifdef HAVE_WAYLAND +/* SDL_VIDEO_DRIVER_WAYLAND is defined by SDL2 */ +#if defined(HAVE_WAYLAND) && defined(SDL_VIDEO_DRIVER_WAYLAND) video_driver_display_type_set(RARCH_DISPLAY_WAYLAND); video_driver_display_set((uintptr_t)info.info.wl.display); video_driver_window_set((uintptr_t)info.info.wl.surface);