mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-25 08:35:31 +00:00
Fixed bug 2579 - SDL fails to compile on Windows when only EGL+OpenGL ES defined
callow.mark Compiling with SDL_VIDEO_RENDER_OGL=0, SDL_VIDEO_OPENGL=0, SDL_VIDEO_OPENGL_WGL=0, SDL_VIDEO_RENDER_OGL_ES2=1, SDL_VIDEO_OPENGL_ES2=1 and SDL_VIDEO_OPENGL_EGL=1 set in SDL_config_windows.h fails. A patch is attached. See bug #2570 for reasons you might want to compile this way.
This commit is contained in:
parent
1b3d4e6d0e
commit
cff9eac637
|
@ -64,6 +64,7 @@ WIN_GLES_CreateContext(_THIS, SDL_Window * window)
|
||||||
SDL_GLContext context;
|
SDL_GLContext context;
|
||||||
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
||||||
|
|
||||||
|
#if SDL_VIDEO_OPENGL_WGL
|
||||||
if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) {
|
if (_this->gl_config.profile_mask != SDL_GL_CONTEXT_PROFILE_ES) {
|
||||||
/* Switch to WGL based functions */
|
/* Switch to WGL based functions */
|
||||||
WIN_GLES_UnloadLibrary(_this);
|
WIN_GLES_UnloadLibrary(_this);
|
||||||
|
@ -83,6 +84,7 @@ WIN_GLES_CreateContext(_THIS, SDL_Window * window)
|
||||||
|
|
||||||
return WIN_GL_CreateContext(_this, window);
|
return WIN_GL_CreateContext(_this, window);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
context = SDL_EGL_CreateContext(_this, data->egl_surface);
|
context = SDL_EGL_CreateContext(_this, data->egl_surface);
|
||||||
return context;
|
return context;
|
||||||
|
|
|
@ -159,6 +159,17 @@ WIN_CreateDevice(int devindex)
|
||||||
device->GL_GetSwapInterval = WIN_GL_GetSwapInterval;
|
device->GL_GetSwapInterval = WIN_GL_GetSwapInterval;
|
||||||
device->GL_SwapWindow = WIN_GL_SwapWindow;
|
device->GL_SwapWindow = WIN_GL_SwapWindow;
|
||||||
device->GL_DeleteContext = WIN_GL_DeleteContext;
|
device->GL_DeleteContext = WIN_GL_DeleteContext;
|
||||||
|
#elif SDL_VIDEO_OPENGL_EGL
|
||||||
|
/* Use EGL based functions */
|
||||||
|
device->GL_LoadLibrary = WIN_GLES_LoadLibrary;
|
||||||
|
device->GL_GetProcAddress = WIN_GLES_GetProcAddress;
|
||||||
|
device->GL_UnloadLibrary = WIN_GLES_UnloadLibrary;
|
||||||
|
device->GL_CreateContext = WIN_GLES_CreateContext;
|
||||||
|
device->GL_MakeCurrent = WIN_GLES_MakeCurrent;
|
||||||
|
device->GL_SetSwapInterval = WIN_GLES_SetSwapInterval;
|
||||||
|
device->GL_GetSwapInterval = WIN_GLES_GetSwapInterval;
|
||||||
|
device->GL_SwapWindow = WIN_GLES_SwapWindow;
|
||||||
|
device->GL_DeleteContext = WIN_GLES_DeleteContext;
|
||||||
#endif
|
#endif
|
||||||
device->StartTextInput = WIN_StartTextInput;
|
device->StartTextInput = WIN_StartTextInput;
|
||||||
device->StopTextInput = WIN_StopTextInput;
|
device->StopTextInput = WIN_StopTextInput;
|
||||||
|
|
Loading…
Reference in a new issue