From 03f8528315fa46c95991a34f3325d7b33ae5538c Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Sat, 02 May 2020 21:48:36 +0000
Subject: [PATCH] Update source to SDL2 2.0.12

---
 source/src/video/SDL_egl_c.h |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/source/src/video/SDL_egl_c.h b/source/src/video/SDL_egl_c.h
index d1c4129..83bd634 100644
--- a/source/src/video/SDL_egl_c.h
+++ b/source/src/video/SDL_egl_c.h
@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
+  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -29,6 +29,8 @@
 
 #include "SDL_sysvideo.h"
 
+#define SDL_EGL_MAX_DEVICES     8
+
 typedef struct SDL_EGL_VideoData
 {
     void *egl_dll_handle, *dll_handle;
@@ -37,6 +39,7 @@
     int egl_swapinterval;
     int egl_surfacetype;
     int egl_version_major, egl_version_minor;
+    EGLint egl_required_visual_id;
     
     EGLDisplay(EGLAPIENTRY *eglGetDisplay) (NativeDisplayType display);
     EGLDisplay(EGLAPIENTRY *eglGetPlatformDisplay) (EGLenum platform,
@@ -80,6 +83,8 @@
     EGLBoolean(EGLAPIENTRY *eglSwapInterval) (EGLDisplay dpy, EGLint interval);
     
     const char *(EGLAPIENTRY *eglQueryString) (EGLDisplay dpy, EGLint name);
+
+    EGLenum(EGLAPIENTRY *eglQueryAPI)(void);
     
     EGLBoolean(EGLAPIENTRY  *eglGetConfigAttrib) (EGLDisplay dpy, EGLConfig config,
                                      EGLint attribute, EGLint * value);
@@ -92,6 +97,13 @@
 
     EGLint(EGLAPIENTRY *eglGetError)(void);
 
+    EGLBoolean(EGLAPIENTRY *eglQueryDevicesEXT)(EGLint max_devices,
+                                            void **devices,
+                                            EGLint *num_devices);
+
+    /* whether EGL display was offscreen */
+    int is_offscreen;
+
 } SDL_EGL_VideoData;
 
 /* OpenGLES functions */
@@ -99,9 +111,11 @@
 /* SDL_EGL_LoadLibrary can get a display for a specific platform (EGL_PLATFORM_*)
  * or, if 0 is passed, let the implementation decide.
  */
+extern int SDL_EGL_LoadLibraryOnly(_THIS, const char *path);
 extern int SDL_EGL_LoadLibrary(_THIS, const char *path, NativeDisplayType native_display, EGLenum platform);
 extern void *SDL_EGL_GetProcAddress(_THIS, const char *proc);
 extern void SDL_EGL_UnloadLibrary(_THIS);
+extern void SDL_EGL_SetRequiredVisualId(_THIS, int visual_id);
 extern int SDL_EGL_ChooseConfig(_THIS);
 extern int SDL_EGL_SetSwapInterval(_THIS, int interval);
 extern int SDL_EGL_GetSwapInterval(_THIS);
@@ -109,6 +123,10 @@
 extern EGLSurface *SDL_EGL_CreateSurface(_THIS, NativeWindowType nw);
 extern void SDL_EGL_DestroySurface(_THIS, EGLSurface egl_surface);
 
+extern EGLSurface SDL_EGL_CreateOffscreenSurface(_THIS, int width, int height);
+/* Assumes that LoadLibraryOnly() has succeeded */
+extern int SDL_EGL_InitializeOffscreen(_THIS, int device);
+
 /* These need to be wrapped to get the surface for the window by the platform GLES implementation */
 extern SDL_GLContext SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface);
 extern int SDL_EGL_MakeCurrent(_THIS, EGLSurface egl_surface, SDL_GLContext context);

--
Gitblit v1.9.3