qglFlush(); // ensure that the commands are submitted to the GPU before we do other things
- if (!vid_activewindow)
- VID_SetMouse(false, false, false);
- else if (key_consoleactive)
- VID_SetMouse(vid.fullscreen, false, false);
- else if (key_dest == key_menu_grabbed)
- VID_SetMouse(true, vid_mouse.integer && !in_client_mouse && !vid_touchscreen.integer, !vid_touchscreen.integer);
- else if (key_dest == key_menu || scr_loading)
- VID_SetMouse(vid.fullscreen, vid_mouse.integer && !in_client_mouse && !vid_touchscreen.integer, !vid_touchscreen.integer);
+ if (!vid_activewindow || key_consoleactive)
+ VID_SetMouse(false, false);
+ else if (key_dest == key_menu || key_dest == key_menu_grabbed || scr_loading)
+ VID_SetMouse(vid_mouse.integer && !in_client_mouse && !vid_touchscreen.integer, !vid_touchscreen.integer);
else
- VID_SetMouse(vid.fullscreen, vid_mouse.integer && !cl.csqc_wantsmousemove && cl_prydoncursor.integer <= 0 && (!cls.demoplayback || cl_demo_mousegrab.integer) && !vid_touchscreen.integer, !vid_touchscreen.integer);
+ VID_SetMouse(vid_mouse.integer && !cl.csqc_wantsmousemove && cl_prydoncursor.integer <= 0 && (!cls.demoplayback || cl_demo_mousegrab.integer) && !vid_touchscreen.integer, !vid_touchscreen.integer);
VID_Finish();
}
void VID_ShowKeyboard(qbool show);
qbool VID_ShowingKeyboard(void);
-void VID_SetMouse (qbool fullscreengrab, qbool relative, qbool hidecursor);
+void VID_SetMouse(qbool relative, qbool hidecursor);
void VID_Finish (void);
void VID_Restart_f(struct cmd_state_s *cmd);
}
#endif
-void VID_SetMouse (qbool fullscreengrab, qbool relative, qbool hidecursor)
+void VID_SetMouse(qbool relative, qbool hidecursor)
{
}
return SDL_IsTextInputActive() != 0;
}
-void VID_SetMouse(qbool fullscreengrab, qbool relative, qbool hidecursor)
+void VID_SetMouse(qbool relative, qbool hidecursor)
{
#ifndef DP_MOBILETOUCH
#ifdef MACOSX
vid_usingmouse = relative;
cl_ignoremousemoves = 2;
vid_usingmouse_relativeworks = SDL_SetRelativeMouseMode(relative ? SDL_TRUE : SDL_FALSE) == 0;
-// Con_Printf("VID_SetMouse(%i, %i, %i) relativeworks = %i\n", (int)fullscreengrab, (int)relative, (int)hidecursor, (int)vid_usingmouse_relativeworks);
+// Con_Printf("VID_SetMouse(%i, %i) relativeworks = %i\n", (int)relative, (int)hidecursor, (int)vid_usingmouse_relativeworks);
#ifdef MACOSX
if(relative)
{
void VID_Shutdown (void)
{
VID_EnableJoystick(false);
- VID_SetMouse(false, false, false);
+ VID_SetMouse(false, false);
SDL_DestroyWindow(window);
window = NULL;