summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/GLInterface/WGL.cpp
diff options
context:
space:
mode:
authorJack Frost <j4ck.fr0st@gmail.com>2013-12-31 00:03:49 +0100
committerdegasus <wickmarkus@web.de>2014-01-17 16:01:17 +0100
commitf4bd7bdef0b9997ad25d46e58a09b266887d38e3 (patch)
tree4a55ec9aa43405c661cbecc40ffa23debecca39f /Source/Core/DolphinWX/GLInterface/WGL.cpp
parent10bd61a9d27cd06214eb9470758831a32c9962bc (diff)
fix windows build
add the GL include (back) to Base.props use a similar technique to GLX.cpp (by Sonic) in WGL.cpp to get wglSwapIntervalEXT without the WGLEW check Conflicts: Source/Core/VideoBackends/OGL/OGL.vcxproj Source/Core/VideoBackends/OGL/OGL.vcxproj.filters Source/VSProps/Base.props
Diffstat (limited to 'Source/Core/DolphinWX/GLInterface/WGL.cpp')
-rw-r--r--Source/Core/DolphinWX/GLInterface/WGL.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/GLInterface/WGL.cpp b/Source/Core/DolphinWX/GLInterface/WGL.cpp
index 34c5e6a465..8bc9e7a73a 100644
--- a/Source/Core/DolphinWX/GLInterface/WGL.cpp
+++ b/Source/Core/DolphinWX/GLInterface/WGL.cpp
@@ -14,9 +14,13 @@
static HDC hDC = NULL; // Private GDI Device Context
static HGLRC hRC = NULL; // Permanent Rendering Context
+// typedef from wglext.h
+typedef BOOL(WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
+static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
+
void cInterfaceWGL::SwapInterval(int Interval)
{
- if (WGLEW_EXT_swap_control)
+ if (wglSwapIntervalEXT)
wglSwapIntervalEXT(Interval);
else
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
@@ -71,6 +75,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
Host_SysMessage("failed to create window");
return false;
}
+ wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLInterface->GetProcAddress("wglSwapIntervalEXT");
// Show the window
EmuWindow::Show();
@@ -97,7 +102,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
0, 0, 0 // Layer Masks Ignored
};
- GLuint PixelFormat; // Holds The Results After Searching For A Match
+ int PixelFormat; // Holds The Results After Searching For A Match
if (!(hDC=GetDC(EmuWindow::GetWnd()))) {
PanicAlert("(1) Can't create an OpenGL Device context. Fail.");