+}
+
+void ChangeVsyncModeIfNeeded(void)
+{
+ int setup_vsync_mode = VSYNC_MODE_STR_TO_INT(setup.vsync_mode);
+ int video_vsync_mode = video.vsync_mode;
+
+ // if setup and video vsync mode are already matching, nothing do do
+ if (setup_vsync_mode == video_vsync_mode)
+ return;
+
+ // if renderer is using OpenGL, vsync mode can directly be changed
+ SDLSetScreenVsyncMode(setup.vsync_mode);