Improve support for private platforms (#11220)

This commit is contained in:
Caleb Cornett
2024-10-15 18:02:07 -04:00
committed by GitHub
parent 66d09a1cda
commit 9af5ffcfbe
27 changed files with 70 additions and 18 deletions

View File

@@ -300,7 +300,9 @@ void SDL_EGL_UnloadLibrary(SDL_VideoDevice *_this)
static bool SDL_EGL_LoadLibraryInternal(SDL_VideoDevice *_this, const char *egl_path)
{
SDL_SharedObject *egl_dll_handle = NULL;
#if !defined(SDL_VIDEO_STATIC_ANGLE) && !defined(SDL_VIDEO_DRIVER_VITA)
SDL_SharedObject *opengl_dll_handle = NULL;
#endif
const char *path = NULL;
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
const char *d3dcompiler;
@@ -426,9 +428,6 @@ static bool SDL_EGL_LoadLibraryInternal(SDL_VideoDevice *_this, const char *egl_
#endif
_this->egl_data->egl_dll_handle = egl_dll_handle;
#ifdef SDL_VIDEO_DRIVER_VITA
_this->egl_data->opengl_dll_handle = opengl_dll_handle;
#endif
// Load new function pointers
LOAD_FUNC(PFNEGLGETDISPLAYPROC, eglGetDisplay);

View File

@@ -498,6 +498,7 @@ typedef struct VideoBootStrap
} VideoBootStrap;
// Not all of these are available in a given build. Use #ifdefs, etc.
extern VideoBootStrap PRIVATE_bootstrap;
extern VideoBootStrap COCOA_bootstrap;
extern VideoBootStrap X11_bootstrap;
extern VideoBootStrap WINDOWS_bootstrap;

View File

@@ -71,6 +71,9 @@
// Available video drivers
static VideoBootStrap *bootstrap[] = {
#ifdef SDL_VIDEO_DRIVER_PRIVATE
&PRIVATE_bootstrap,
#endif
#ifdef SDL_VIDEO_DRIVER_COCOA
&COCOA_bootstrap,
#endif