mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[egl] don't assume SDL is compiled with Wayland support
This commit is contained in:
parent
d1c0d2b5f8
commit
7cbaf8b5be
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user