[egl] don't assume SDL is compiled with Wayland support

This commit is contained in:
Geoffrey McRae 2019-03-26 17:29:49 +11:00
parent d1c0d2b5f8
commit 7cbaf8b5be

View File

@ -25,7 +25,10 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <SDL2/SDL_syswm.h>
#include <SDL2/SDL_egl.h>
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
#include <wayland-egl.h>
#endif
#include "egl/model.h"
#include "egl/shader.h"
@ -304,6 +307,7 @@ bool egl_render_startup(void * opaque, SDL_Window * window)
break;
}
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
case SDL_SYSWM_WAYLAND:
{
int width, height;
@ -312,6 +316,7 @@ bool egl_render_startup(void * opaque, SDL_Window * window)
this->nativeWind = (EGLNativeWindowType)wl_egl_window_create(wminfo.info.wl.surface, width, height);
break;
}
#endif
default:
DEBUG_ERROR("Unsupported subsystem");