Fix mouse acceleration not reverting to windows settings on quit.

Can still happen when crashing out.


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4478 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-09-22 06:26:40 +00:00
parent 4e8073aedd
commit 571e6fe748
1 changed files with 5 additions and 3 deletions

View File

@ -398,7 +398,10 @@ static void INS_ActivateMouse (void)
#endif
if (mouseparmsvalid)
restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
{
SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
restore_spi = true;
}
SetCursorPos (window_center_x, window_center_y);
SetCapture (mainwindow);
@ -1155,11 +1158,10 @@ INS_Shutdown
*/
void INS_Shutdown (void)
{
mouseinitialized = false;
INS_DeactivateMouse ();
INS_ShowMouse ();
mouseinitialized = false;
mouseparmsvalid = false;
#ifdef AVAIL_DINPUT