You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Add (void *) cast directly to GetProcAddress calls.
This commit is contained in:
@@ -50,11 +50,6 @@
|
||||
|
||||
#define _WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
|
||||
#if defined(__GNUC__)
|
||||
// Workaround GCC warning from -Wcast-function-type.
|
||||
#define GetProcAddress (void *)GetProcAddress
|
||||
#endif
|
||||
|
||||
typedef HGLRC(APIENTRY *PFNWGLCREATECONTEXT)(HDC);
|
||||
typedef BOOL(APIENTRY *PFNWGLDELETECONTEXT)(HGLRC);
|
||||
typedef BOOL(APIENTRY *PFNWGLMAKECURRENT)(HDC, HGLRC);
|
||||
@@ -364,10 +359,10 @@ Error GLManagerNative_Windows::_create_context(GLWindow &win, GLDisplay &gl_disp
|
||||
if (!module) {
|
||||
return ERR_CANT_CREATE;
|
||||
}
|
||||
gd_wglCreateContext = (PFNWGLCREATECONTEXT)GetProcAddress(module, "wglCreateContext");
|
||||
gd_wglMakeCurrent = (PFNWGLMAKECURRENT)GetProcAddress(module, "wglMakeCurrent");
|
||||
gd_wglDeleteContext = (PFNWGLDELETECONTEXT)GetProcAddress(module, "wglDeleteContext");
|
||||
gd_wglGetProcAddress = (PFNWGLGETPROCADDRESS)GetProcAddress(module, "wglGetProcAddress");
|
||||
gd_wglCreateContext = (PFNWGLCREATECONTEXT)(void *)GetProcAddress(module, "wglCreateContext");
|
||||
gd_wglMakeCurrent = (PFNWGLMAKECURRENT)(void *)GetProcAddress(module, "wglMakeCurrent");
|
||||
gd_wglDeleteContext = (PFNWGLDELETECONTEXT)(void *)GetProcAddress(module, "wglDeleteContext");
|
||||
gd_wglGetProcAddress = (PFNWGLGETPROCADDRESS)(void *)GetProcAddress(module, "wglGetProcAddress");
|
||||
if (!gd_wglCreateContext || !gd_wglMakeCurrent || !gd_wglDeleteContext || !gd_wglGetProcAddress) {
|
||||
return ERR_CANT_CREATE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user