[GDI32] Add casts to silence warnings on x64

The cast is required, because FARPROC is only compatible with function pointer types that return INT_PTR and the ones used return int/BOOL.
This commit is contained in:
Timo Kreuzer 2019-01-13 15:29:13 +01:00
parent 711dbd19f7
commit 7dabd235ec

View file

@ -84,20 +84,20 @@ static BOOL OpenGLEnable(void)
thread-safe */
}
if (!OpenGLInitFunction("wglChoosePixelFormat", &glChoosePixelFormat))
/* The cast is required on x64, because FARPROC has INT_PTR sized return */
if (!OpenGLInitFunction("wglChoosePixelFormat", (FARPROC*)&glChoosePixelFormat))
Ret = FALSE;
if (!OpenGLInitFunction("wglSetPixelFormat", &glSetPixelFormat))
if (!OpenGLInitFunction("wglSetPixelFormat", (FARPROC*)&glSetPixelFormat))
Ret = FALSE;
if (!OpenGLInitFunction("wglSwapBuffers", &glSwapBuffers))
if (!OpenGLInitFunction("wglSwapBuffers", (FARPROC*)&glSwapBuffers))
Ret = FALSE;
if (!OpenGLInitFunction("wglDescribePixelFormat", &glDescribePixelFormat))
if (!OpenGLInitFunction("wglDescribePixelFormat", (FARPROC*)&glDescribePixelFormat))
Ret = FALSE;
if (!OpenGLInitFunction("wglGetPixelFormat", &glGetPixelFormat))
if (!OpenGLInitFunction("wglGetPixelFormat", (FARPROC*)&glGetPixelFormat))
Ret = FALSE;
return Ret;