diff --git a/daemon/x52d_mouse.c b/daemon/x52d_mouse.c index 12097e6..412d08a 100644 --- a/daemon/x52d_mouse.c +++ b/daemon/x52d_mouse.c @@ -15,19 +15,20 @@ #include "x52d_const.h" #include "x52d_mouse.h" -// Mouse speed is the delay between subsequent mouse reports -#define DEFAULT_MOUSE_SPEED 250000 +// Mouse speed is the delay in microseconds between subsequent mouse reports +#define DEFAULT_MOUSE_DELAY 70000 +#define MOUSE_DELAY_DELTA 10000 volatile bool mouse_enabled = false; -volatile int mouse_delay = DEFAULT_MOUSE_SPEED; +volatile int mouse_delay = DEFAULT_MOUSE_DELAY; #define MAX_MOUSE_SPEED 5 static const int mouse_speed_map[MAX_MOUSE_SPEED] = { - 250000, - 200000, - 150000, - 100000, - 50000, + DEFAULT_MOUSE_DELAY, + DEFAULT_MOUSE_DELAY - MOUSE_DELAY_DELTA*1, + DEFAULT_MOUSE_DELAY - MOUSE_DELAY_DELTA*2, + DEFAULT_MOUSE_DELAY - MOUSE_DELAY_DELTA*3, + DEFAULT_MOUSE_DELAY - MOUSE_DELAY_DELTA*4, }; void x52d_cfg_set_Mouse_Enabled(bool enabled) diff --git a/po/x52pro-linux.pot b/po/x52pro-linux.pot index 4a7bcf0..c784ff3 100644 --- a/po/x52pro-linux.pot +++ b/po/x52pro-linux.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: x52pro-linux 0.2.2\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n" -"POT-Creation-Date: 2021-09-15 00:09-0700\n" +"POT-Creation-Date: 2021-09-15 09:25-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -142,11 +142,11 @@ msgstr "" msgid "Unknown LED state %d" msgstr "" -#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:36 +#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:37 msgid "off" msgstr "" -#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:36 +#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:37 msgid "on" msgstr "" @@ -735,17 +735,17 @@ msgstr "" msgid "Shutting down X52 I/O driver thread" msgstr "" -#: daemon/x52d_mouse.c:35 +#: daemon/x52d_mouse.c:36 #, c-format msgid "Setting mouse enable to %s" msgstr "" -#: daemon/x52d_mouse.c:47 +#: daemon/x52d_mouse.c:48 #, c-format msgid "Setting mouse speed to %d (delay %d ms)" msgstr "" -#: daemon/x52d_mouse.c:51 +#: daemon/x52d_mouse.c:52 #, c-format msgid "Ignoring mouse speed %d outside supported range (0-%d)" msgstr "" diff --git a/po/xx_PL.po b/po/xx_PL.po index dd5d35d..09d13f5 100644 --- a/po/xx_PL.po +++ b/po/xx_PL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: x52pro-linux 0.2.1\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n" -"POT-Creation-Date: 2021-09-15 00:09-0700\n" +"POT-Creation-Date: 2021-09-15 09:25-0700\n" "PO-Revision-Date: 2021-09-15 00:12-0700\n" "Last-Translator: Nirenjan Krishnan \n" "Language-Team: Dummy Language for testing i18n\n" @@ -142,11 +142,11 @@ msgstr "YYay-MMay-DDay" msgid "Unknown LED state %d" msgstr "Unknownay EDLay atestay %d" -#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:36 +#: libx52/x52_stringify.c:47 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:37 msgid "off" msgstr "offay" -#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:36 +#: libx52/x52_stringify.c:48 daemon/x52d_clock.c:28 daemon/x52d_mouse.c:37 msgid "on" msgstr "onay" @@ -784,17 +784,17 @@ msgstr "Erroray %d initializingay I/O iverdray eadthray: %s" msgid "Shutting down X52 I/O driver thread" msgstr "Uttingshay ownday X52 I/O iverdray eadthray" -#: daemon/x52d_mouse.c:35 +#: daemon/x52d_mouse.c:36 #, c-format msgid "Setting mouse enable to %s" msgstr "Ettingsay ousemay enableay otay %s" -#: daemon/x52d_mouse.c:47 +#: daemon/x52d_mouse.c:48 #, c-format msgid "Setting mouse speed to %d (delay %d ms)" msgstr "Ettingsay ousemay eedspay otay %d (elayday %d ms)" -#: daemon/x52d_mouse.c:51 +#: daemon/x52d_mouse.c:52 #, c-format msgid "Ignoring mouse speed %d outside supported range (0-%d)" msgstr "Ignoringay ousemay eedspay %d outsideay upportedsay angeray (0-%d)"