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:
@ -110,7 +110,6 @@ bool cInterfaceGLX::Create(void *&window_handle)
|
||||
PanicAlert("Unable to create GLX context.");
|
||||
return false;
|
||||
}
|
||||
glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)GLInterface->GetFuncAddress("glXSwapIntervalSGI");
|
||||
|
||||
GLWin.x = _tx;
|
||||
GLWin.y = _ty;
|
||||
@ -131,7 +130,14 @@ bool cInterfaceGLX::MakeCurrent()
|
||||
XMoveResizeWindow(GLWin.evdpy, GLWin.win, GLWin.x, GLWin.y,
|
||||
GLWin.width, GLWin.height);
|
||||
#endif
|
||||
return glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
|
||||
|
||||
bool success = glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
|
||||
if (success)
|
||||
{
|
||||
// load this function based on the current bound context
|
||||
glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)GLInterface->GetFuncAddress("glXSwapIntervalSGI");
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
bool cInterfaceGLX::ClearCurrent()
|
||||
|
Reference in New Issue
Block a user