mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Fetch swapInterval function pointer after binding a context
This fixes vsync on windows
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user