From e77ccca75d6f8b7551ff3952fe8eeeb4f0fcbdd0 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 2 Mar 2015 19:00:45 -0800 Subject: [PATCH] really fix opengl compile on MSVC (thanks to couriersud) (nw) --- src/osd/modules/opengl/osd_opengl.h | 1 + src/osd/modules/render/drawogl.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/osd/modules/opengl/osd_opengl.h b/src/osd/modules/opengl/osd_opengl.h index 5fdd366a476..94eab4e145b 100644 --- a/src/osd/modules/opengl/osd_opengl.h +++ b/src/osd/modules/opengl/osd_opengl.h @@ -17,6 +17,7 @@ */ #ifdef OSD_WINDOWS #ifdef _MSC_VER + #include #include "SDL1211_opengl.h" #else #include "GL/gl.h" diff --git a/src/osd/modules/render/drawogl.c b/src/osd/modules/render/drawogl.c index d931b13450d..860d33ae1a8 100644 --- a/src/osd/modules/render/drawogl.c +++ b/src/osd/modules/render/drawogl.c @@ -199,10 +199,10 @@ public: { m_error[0] = 0; - this->pfn_wglGetProcAddress = (PROC WINAPI (*)(LPCSTR lpszProc)) GetProcAddress(m_module, "wglGetProcAddress"); - this->pfn_wglCreateContext = (HGLRC WINAPI (*)(HDC hdc)) GetProcAddress(m_module, "wglCreateContext"); - this->pfn_wglDeleteContext = (BOOL WINAPI (*)(HGLRC hglrc)) GetProcAddress(m_module, "wglDeleteContext"); - this->pfn_wglMakeCurrent = (BOOL WINAPI (*)(HDC hdc, HGLRC hglrc)) GetProcAddress(m_module, "wglMakeCurrent"); + this->pfn_wglGetProcAddress = (PROC (WINAPI *)(LPCSTR lpszProc)) GetProcAddress(m_module, "wglGetProcAddress"); + this->pfn_wglCreateContext = (HGLRC (WINAPI *)(HDC hdc)) GetProcAddress(m_module, "wglCreateContext"); + this->pfn_wglDeleteContext = (BOOL (WINAPI *)(HGLRC hglrc)) GetProcAddress(m_module, "wglDeleteContext"); + this->pfn_wglMakeCurrent = (BOOL (WINAPI *)(HDC hdc, HGLRC hglrc)) GetProcAddress(m_module, "wglMakeCurrent"); m_hdc = GetDC(window); if (!setupPixelFormat(m_hdc)) @@ -306,10 +306,10 @@ private: HDC m_hdc; char m_error[256]; - PROC WINAPI (*pfn_wglGetProcAddress)(LPCSTR lpszProc); - HGLRC WINAPI (*pfn_wglCreateContext)(HDC hdc); - BOOL WINAPI (*pfn_wglDeleteContext)(HGLRC hglrc); - BOOL WINAPI (*pfn_wglMakeCurrent)(HDC hdc, HGLRC hglrc); + PROC (WINAPI *pfn_wglGetProcAddress)(LPCSTR lpszProc); + HGLRC (WINAPI *pfn_wglCreateContext)(HDC hdc); + BOOL (WINAPI *pfn_wglDeleteContext)(HGLRC hglrc); + BOOL (WINAPI *pfn_wglMakeCurrent)(HDC hdc, HGLRC hglrc); static HMODULE m_module; };