We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15caaae commit b2c3b49Copy full SHA for b2c3b49
src/projectM-sdl/projectM_SDL_main.cpp
@@ -306,7 +306,11 @@ srand((int)(time(NULL)));
306
SDL_SetWindowTitle(win, "projectM Visualizer");
307
308
SDL_GL_MakeCurrent(win, glCtx); // associate GL context with main window
309
- SDL_GL_SetSwapInterval(-1); // Enable adaptive vsync
+ int avsync = SDL_GL_SetSwapInterval(-1); // try to enable adaptive vsync
310
+ if (avsync == -1) { // adaptive vsync not supported
311
+ SDL_GL_SetSwapInterval(1); // enable updates synchronized with vertical retrace
312
+ }
313
+
314
315
projectMSDL *app;
316
0 commit comments