diff options
| author | degasus <wickmarkus@web.de> | 2014-02-24 12:45:02 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-02-24 12:45:02 +0100 |
| commit | 8af3f751db100890f403945d8374a47ea76244b4 (patch) | |
| tree | 3854519e5d4c96926dfa8d3f106fef2ef48c21cd /Source/Core/DolphinWX/GLInterface/WGL.cpp | |
| parent | 21bb722c9352cc50b3eea95ec7579abdce58613c (diff) | |
Fetch swapInterval function pointer after binding a context
This fixes vsync on windows
Diffstat (limited to 'Source/Core/DolphinWX/GLInterface/WGL.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/GLInterface/WGL.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/GLInterface/WGL.cpp b/Source/Core/DolphinWX/GLInterface/WGL.cpp index 5de1468113..db3bc3d0f1 100644 --- a/Source/Core/DolphinWX/GLInterface/WGL.cpp +++ b/Source/Core/DolphinWX/GLInterface/WGL.cpp @@ -128,9 +128,6 @@ bool cInterfaceWGL::Create(void *&window_handle) return false; } - // Grab the swap interval function pointer - wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLInterface->GetFuncAddress("wglSwapIntervalEXT"); - return true; } @@ -141,7 +138,13 @@ bool cInterfaceWGL::MakeCurrent() bool cInterfaceWGL::ClearCurrent() { - return wglMakeCurrent(hDC, NULL) ? true : false; + bool success = wglMakeCurrent(hDC, NULL) ? true : false; + if (success) + { + // Grab the swap interval function pointer + wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLInterface->GetFuncAddress("wglSwapIntervalEXT"); + } + return success; } // Update window width, size and etc. Called from Render.cpp |
