Author: tkreuzer
Date: Wed Mar 28 07:09:53 2012
New Revision: 56254
URL:
http://svn.reactos.org/svn/reactos?rev=56254&view=rev
Log:
[DESK.CPL]
Simplify code, patch by Edijs Kolesnikovics (terminedijs at yahoo dot com)
Modified:
trunk/reactos/dll/cpl/main/mouse.c
Modified: trunk/reactos/dll/cpl/main/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=5…
==============================================================================
--- trunk/reactos/dll/cpl/main/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/main/mouse.c [iso-8859-1] Wed Mar 28 07:09:53 2012
@@ -1415,8 +1415,8 @@
/* Set mouse speed */
hDlgCtrl = GetDlgItem(hwndDlg, IDC_SLIDER_MOUSE_SPEED);
- SendMessage(hDlgCtrl, TBM_SETRANGE, (WPARAM)TRUE, (LPARAM)MAKELONG(0, 19));
- SendMessage(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)pOptionData->ulMouseSpeed - 1);
+ SendMessage(hDlgCtrl, TBM_SETRANGE, (WPARAM)TRUE, (LPARAM)MAKELONG(1, 20));
+ SendMessage(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE,
(LPARAM)pOptionData->ulMouseSpeed);
if (pOptionData->MouseAccel.nAcceleration)
{
@@ -1625,7 +1625,7 @@
case TB_TOP:
case TB_BOTTOM:
case TB_ENDTRACK:
- pOptionData->ulMouseSpeed = (ULONG)SendDlgItemMessage(hwndDlg,
IDC_SLIDER_MOUSE_SPEED, TBM_GETPOS, 0, 0) + 1;
+ pOptionData->ulMouseSpeed = (ULONG)SendDlgItemMessage(hwndDlg,
IDC_SLIDER_MOUSE_SPEED, TBM_GETPOS, 0, 0);
SystemParametersInfo(SPI_SETMOUSESPEED, 0,
IntToPtr(pOptionData->ulMouseSpeed), SPIF_SENDCHANGE);
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
break;