BGE: Cleaning up the vsync code a little.
[blender-staging.git] / source / gameengine / GamePlayer / ghost / GPG_Application.cpp
index 88468ecc88a518982bfe96fb67cfb38e8242ca1e..ad6c8a38305bf952b61960fc357644cd7cad8f6a 100644 (file)
@@ -586,7 +586,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
                if (gm->vsync == VSYNC_ADAPTIVE)
                        m_canvas->SetSwapInterval(-1);
                else
-                       m_canvas->SetSwapInterval(!gm->vsync); // VSYNC_OFF == 1, VSYNC_ON == 0, so this works
+                       m_canvas->SetSwapInterval((gm->vsync == VSYNC_ON) ? 1 : 0);
 
                m_canvas->Init();
                if (gm->flag & GAME_SHOW_MOUSE)