diff options
4 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index ceb745cf90a..002d77fb0e6 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -693,8 +693,8 @@ typedef struct GameData { #define RAS_STORE_VBO 3 /* vsync */ -#define VSYNC_OFF 0 -#define VSYNC_ON 1 +#define VSYNC_ON 0 +#define VSYNC_OFF 1 #define VSYNC_ADAPTIVE 2 /* GameData.flag */ diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 7b5f5a7096a..c3bd93fec81 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -290,7 +290,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c if (startscene->gm.vsync == VSYNC_ADAPTIVE) canvas->SetSwapInterval(-1); else - canvas->SetSwapInterval(startscene->gm.vsync); // VSYNC_OFF == 0, VSYNC_ON == 1, so this works + canvas->SetSwapInterval(!startscene->gm.vsync); // VSYNC_OFF == 1, VSYNC_ON == 0, so this works RAS_IRenderTools* rendertools = new KX_BlenderRenderTools(); RAS_IRasterizer* rasterizer = NULL; diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index c3cbf381af4..88468ecc88a 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -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 == 0, VSYNC_ON == 1, so this works + m_canvas->SetSwapInterval(!gm->vsync); // VSYNC_OFF == 1, VSYNC_ON == 0, so this works m_canvas->Init(); if (gm->flag & GAME_SHOW_MOUSE) diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index ae9cbbb2656..efda1c5301b 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -1378,14 +1378,14 @@ static PyObject *gPySetVsync(PyObject *, PyObject *args) if (!PyArg_ParseTuple(args, "i:setVsync", &interval)) return NULL; - if (interval < VSYNC_OFF || interval > VSYNC_ADAPTIVE) { + if (interval < 0 || interval > VSYNC_ADAPTIVE) { PyErr_SetString(PyExc_ValueError, "Rasterizer.setVsync(value): value must be VSYNC_OFF, VSYNC_ON, or VSYNC_ADAPTIVE"); return NULL; } if (interval == VSYNC_ADAPTIVE) interval = -1; - gp_Canvas->SetSwapInterval(interval); + gp_Canvas->SetSwapInterval(!interval); // VSYNC_OFF == 1, VSYNC_ON == 0, so this works Py_RETURN_NONE; } |