+ if (vid_usingvsync != vid_usevsync && gl_videosyncavailable)
{
- if (r_speeds.integer || gl_finish.integer)
- qglFinish();
- qglXSwapBuffers(vidx11_display, win);
+ vid_usingvsync = vid_usevsync;
+ if (qglXSwapIntervalSGI (vid_usevsync))
+ Con_Print("glXSwapIntervalSGI didn't accept the vid_vsync change, it will take effect on next vid_restart (GLX_SGI_swap_control does not allow turning off vsync)\n");
}
// handle the mouse state when windowed if that's changed
- usemouse = false;
- if (vid_mouse.integer && !key_consoleactive)
- usemouse = true;
- if (vidmode_active)
- usemouse = true;
- if (usemouse)
- {
- if (!usingmouse)
- {
- usingmouse = true;
- IN_ActivateMouse ();
- }
- }
- else
+ vid_usemouse = false;
+ if (vid_mouse.integer && !key_consoleactive && !cls.demoplayback)
+ vid_usemouse = true;
+ if (!vid_activewindow)
+ vid_usemouse = false;
+ if (vid_isfullscreen)
+ vid_usemouse = true;
+ IN_Activate(vid_usemouse);
+
+ if (r_render.integer)
{
- if (usingmouse)
- {
- usingmouse = false;
- IN_DeactivateMouse ();
- }
+ if (r_speeds.integer || gl_finish.integer)
+ qglFinish();
+ qglXSwapBuffers(vidx11_display, win);
}
}
@@ -776,7+778,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp)