mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-27 17:54:18 +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:
@@ -38,8 +38,7 @@ void Emscripten_GLES_UnloadLibrary(_THIS)
|
||||
{
|
||||
}
|
||||
|
||||
void *
|
||||
Emscripten_GLES_GetProcAddress(_THIS, const char *proc)
|
||||
SDL_FunctionPointer Emscripten_GLES_GetProcAddress(_THIS, const char *proc)
|
||||
{
|
||||
return emscripten_webgl_get_proc_address(proc);
|
||||
}
|
||||
@@ -72,8 +71,7 @@ int Emscripten_GLES_GetSwapInterval(_THIS, int *interval)
|
||||
}
|
||||
}
|
||||
|
||||
SDL_GLContext
|
||||
Emscripten_GLES_CreateContext(_THIS, SDL_Window *window)
|
||||
SDL_GLContext Emscripten_GLES_CreateContext(_THIS, SDL_Window *window)
|
||||
{
|
||||
SDL_WindowData *window_data;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/* OpenGLES functions */
|
||||
extern int Emscripten_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern void Emscripten_GLES_UnloadLibrary(_THIS);
|
||||
extern void *Emscripten_GLES_GetProcAddress(_THIS, const char *proc);
|
||||
extern SDL_FunctionPointer Emscripten_GLES_GetProcAddress(_THIS, const char *proc);
|
||||
extern int Emscripten_GLES_SetSwapInterval(_THIS, int interval);
|
||||
extern int Emscripten_GLES_GetSwapInterval(_THIS, int *interval);
|
||||
extern SDL_GLContext Emscripten_GLES_CreateContext(_THIS, SDL_Window *window);
|
||||
|
||||
Reference in New Issue
Block a user