X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgraphics%2Fviewport.cpp;fp=src%2Fgraphics%2Fviewport.cpp;h=0fe24085739db91a49385b635028497f2c358e6f;hb=f4729fcfcf6f4802dd2439aa23dc3a4faf39827d;hp=a475f3e796f1d4c8d2b2af82987db711d368beb5;hpb=2fd79ba87b03282756f4d653f121f2811d1584c7;p=blank.git diff --git a/src/graphics/viewport.cpp b/src/graphics/viewport.cpp index a475f3e..0fe2408 100644 --- a/src/graphics/viewport.cpp +++ b/src/graphics/viewport.cpp @@ -105,7 +105,12 @@ Viewport::Viewport() void Viewport::VSync(bool b) { if (SDL_GL_SetSwapInterval(b) != 0) { - throw SDLError("SDL_GL_SetSwapInterval"); + if (b) { + throw SDLError("SDL_GL_SetSwapInterval(1)"); + } else { + // allow failure, because this usually means there's no vsync + // support at all, i.e. "it's off" + } } }