From 571e6fe748caed1140cb9bd2e347d77cbb02dbab Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 22 Sep 2013 06:26:40 +0000 Subject: [PATCH] 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 --- engine/client/in_win.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/client/in_win.c b/engine/client/in_win.c index 4f7aa0003..0af1ede0d 100644 --- a/engine/client/in_win.c +++ b/engine/client/in_win.c @@ -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