Move the mouse activation/deactivation into in_win.c.

It now gets handled by the keydest callback (I hope it still works).
This commit is contained in:
Bill Currie 2013-01-24 12:13:00 +09:00
parent 35999b527f
commit ae6dfd8cb6
2 changed files with 8 additions and 18 deletions

View file

@ -354,6 +354,13 @@ static void
win_keydest_callback (keydest_t key_dest)
{
win_in_game = key_dest == key_game;
if (win_in_game) {
IN_ActivateMouse ();
IN_HideMouse ();
} else {
IN_DeactivateMouse ();
IN_ShowMouse ();
}
}
void

View file

@ -264,19 +264,9 @@ VID_SetMode (unsigned char *palette)
// Set either the fullscreen or windowed mode
if (!vid_fullscreen->int_val) {
if (in_grab->int_val && key_dest == key_game) {
stat = VID_SetWindowedMode ();
IN_ActivateMouse ();
IN_HideMouse ();
} else {
IN_DeactivateMouse ();
IN_ShowMouse ();
stat = VID_SetWindowedMode ();
}
stat = VID_SetWindowedMode ();
} else {
stat = VID_SetFullDIBMode ();
IN_ActivateMouse ();
IN_HideMouse ();
}
VID_UpdateWindowStatus (window_x, window_y);
@ -361,13 +351,6 @@ GL_EndRendering (void)
}
} else {
windowed_mouse = true;
if (key_dest == key_game && !in_mouse_avail && ActiveApp) {
IN_ActivateMouse ();
IN_HideMouse ();
} else if (in_mouse_avail && key_dest != key_game) {
IN_DeactivateMouse ();
IN_ShowMouse ();
}
}
}
}