mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: allow to control vsync on Windows
Issue #529 Completely untested
This commit is contained in:
parent
6095f40baf
commit
8f1d00292b
|
@ -130,9 +130,7 @@ bool GSWndWGL::Attach(void* handle, bool managed)
|
|||
|
||||
CheckContext();
|
||||
|
||||
// TODO
|
||||
//m_swapinterval = (PFNGLXSWAPINTERVALMESAPROC)glXGetProcAddress((const GLubyte*) "glXSwapIntervalMESA");
|
||||
//PFNGLXSWAPINTERVALMESAPROC m_swapinterval = (PFNGLXSWAPINTERVALMESAPROC)glXGetProcAddress((const GLubyte*) "glXSwapInterval");
|
||||
m_swapinterval = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
|
||||
|
||||
PopulateGlFunction();
|
||||
|
||||
|
@ -288,9 +286,7 @@ void GSWndWGL::SetVSync(bool enable)
|
|||
// m_swapinterval uses an integer as parameter
|
||||
// 0 -> disable vsync
|
||||
// n -> wait n frame
|
||||
//if (m_swapinterval) m_swapinterval((int)enable);
|
||||
// wglSwapIntervalEXT(!enable);
|
||||
|
||||
if (m_swapinterval) m_swapinterval((int)enable);
|
||||
}
|
||||
|
||||
void GSWndWGL::Flip()
|
||||
|
|
|
@ -29,7 +29,7 @@ class GSWndWGL : public GSWndGL
|
|||
HDC m_NativeDisplay;
|
||||
HGLRC m_context;
|
||||
|
||||
//PFNGLXSWAPINTERVALMESAPROC m_swapinterval;
|
||||
PFNWGLSWAPINTERVALEXTPROC m_swapinterval;
|
||||
|
||||
bool CreateContext(int major, int minor);
|
||||
void CheckContext();
|
||||
|
|
Loading…
Reference in New Issue