mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 23:31:45 +00:00
Functions which return function pointers now return SDL_FunctionPointer instead of void*
This fixes the clang warning "Cast between pointer-to-function and pointer-to-object is an extension" You can define SDL_FUNCTION_POINTER_IS_VOID_POINTER in your project to restore the previous behavior. Fixes https://github.com/libsdl-org/SDL/issues/2866
This commit is contained in:
@@ -76,7 +76,7 @@ struct SDL_GLDriverData
|
||||
} es_profile_max_supported_version;
|
||||
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
void *(WINAPI *wglGetProcAddress)(const char *proc);
|
||||
PROC (WINAPI *wglGetProcAddress)(const char *proc);
|
||||
HGLRC (WINAPI *wglCreateContext)(HDC hdc);
|
||||
BOOL (WINAPI *wglDeleteContext)(HGLRC hglrc);
|
||||
BOOL (WINAPI *wglMakeCurrent)(HDC hdc, HGLRC hglrc);
|
||||
@@ -103,7 +103,7 @@ struct SDL_GLDriverData
|
||||
|
||||
/* OpenGL functions */
|
||||
extern int WIN_GL_LoadLibrary(_THIS, const char *path);
|
||||
extern void *WIN_GL_GetProcAddress(_THIS, const char *proc);
|
||||
extern SDL_FunctionPointer WIN_GL_GetProcAddress(_THIS, const char *proc);
|
||||
extern void WIN_GL_UnloadLibrary(_THIS);
|
||||
extern SDL_bool WIN_GL_UseEGL(_THIS);
|
||||
extern int WIN_GL_SetupWindow(_THIS, SDL_Window *window);
|
||||
|
Reference in New Issue
Block a user