settings: ignore first movement for mouse gestures when reprog controls version is 5 or more
This commit is contained in:
parent
f1d69ede2c
commit
72dbf1c32f
|
@ -928,6 +928,9 @@ class MouseGesture(_Setting):
|
||||||
def move_action(self, dx, dy):
|
def move_action(self, dx, dy):
|
||||||
if self.fsmState == 'pressed':
|
if self.fsmState == 'pressed':
|
||||||
now = _time() * 1000 # _time_ns() / 1e6
|
now = _time() * 1000 # _time_ns() / 1e6
|
||||||
|
if self.device.features.get_feature_version(_F.REPROG_CONTROLS_V4) >= 5 and self.lastEv is None:
|
||||||
|
self.lastEv = now # hack to ignore strange first movement report from MX Master 3S
|
||||||
|
return
|
||||||
if self.lastEv is not None and now - self.lastEv > 50.:
|
if self.lastEv is not None and now - self.lastEv > 50.:
|
||||||
self.push_mouse_event()
|
self.push_mouse_event()
|
||||||
dpi = self.dpiSetting.read() if self.dpiSetting else 1000
|
dpi = self.dpiSetting.read() if self.dpiSetting else 1000
|
||||||
|
|
Loading…
Reference in New Issue