mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Vertical sync on OS X.
Fixes issue 3996. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6946 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -310,8 +310,14 @@ Renderer::Renderer()
|
||||
s_backbuffer_height = (int)OpenGL_GetBackbufferHeight();
|
||||
|
||||
// Handle VSync on/off
|
||||
#ifdef __APPLE__
|
||||
int swapInterval = g_ActiveConfig.bVSync ? 1 : 0;
|
||||
#if defined USE_WX && USE_WX
|
||||
// TODO: FILL IN
|
||||
NSOpenGLContext *ctx = GLWin.glCtxt->GetWXGLContext();
|
||||
#else
|
||||
NSOpenGLContext *ctx = GLWin.cocoaCtx;
|
||||
#endif
|
||||
[ctx setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval];
|
||||
#elif defined _WIN32
|
||||
if (WGLEW_EXT_swap_control)
|
||||
wglSwapIntervalEXT(g_ActiveConfig.bVSync ? 1 : 0);
|
||||
|
Reference in New Issue
Block a user