src/video/kmsdrm/SDL_kmsdrmvideo.c: fix build
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 25 Mar 2020 09:38:45 -0700
changeset 13672389ce8cfa2a3
parent 13671 769f80095217
child 13673 be892626e1aa
src/video/kmsdrm/SDL_kmsdrmvideo.c: fix build
Build is broken without EGL since version 2.0.12 and
https://hg.libsdl.org/SDL/rev/9761858bd6a3:

/home/giuliobenetti/autobuild/run/instance-1/output-1/build/sdl2-2.0.12/src/video/kmsdrm/SDL_kmsdrmvideo.c: In function 'KMSDRM_CreateSurfaces':
/home/giuliobenetti/autobuild/run/instance-1/output-1/build/sdl2-2.0.12/src/video/kmsdrm/SDL_kmsdrmvideo.c:394:5: error: unknown type name 'EGLContext'
EGLContext egl_context;
^

Fixes:
- http://autobuild.buildroot.org/results/fafd20a01591032662f9ca025fcea3478239cf3c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
src/video/kmsdrm/SDL_kmsdrmvideo.c
     1.1 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c	Tue Mar 24 10:05:51 2020 -0700
     1.2 +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c	Wed Mar 25 09:38:45 2020 -0700
     1.3 @@ -391,7 +391,9 @@
     1.4      Uint32 height = dispdata->mode.vdisplay;
     1.5      Uint32 surface_fmt = GBM_FORMAT_XRGB8888;
     1.6      Uint32 surface_flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
     1.7 +#if SDL_VIDEO_OPENGL_EGL
     1.8      EGLContext egl_context;
     1.9 +#endif
    1.10  
    1.11      if (!KMSDRM_gbm_device_is_format_supported(viddata->gbm, surface_fmt, surface_flags)) {
    1.12          SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "GBM surface format not supported. Trying anyway.");