diff options
author | Stany MARCEL <stanypub@gmail.com> | 2015-11-17 00:12:19 +0300 |
---|---|---|
committer | Stany MARCEL <stanypub@gmail.com> | 2015-11-17 00:12:19 +0300 |
commit | bf6f16b5bb582adaa7e7b7e5db80343630955cf8 (patch) | |
tree | fc3dbc9fb2aa0b82b1d9040113324029b1385a31 /src | |
parent | f04627aadafed00664b1fe2689b90cc7888120cd (diff) |
Adjust stick sensibility in button mode
Signed-off-by: Stany MARCEL <stanypub@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/events.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/events.py b/src/events.py index b13366f..2d5977c 100644 --- a/src/events.py +++ b/src/events.py @@ -318,32 +318,32 @@ class EventMapper(object): rmode, rev = self._stick_evts[3] # top - if self._stick_tys is None and y > 0 and y > min(y_p + 600, 32200): - self._stick_tys = max(0, min(y - 600, 32000)) + if self._stick_tys is None and y > 0 and y > min(y_p + 2000, 32000): + self._stick_tys = max(0, min(y - 2000, 31000)) _keypressed(tmode, tev) elif self._stick_tys is not None and y <= self._stick_tys: self._stick_tys = None _keyreleased(tmode, tev) # left - if self._stick_lxs is None and x < 0 and x < max(x_p - 600, -32200): - self._stick_lxs = min(0, max(x + 600, -32000)) + if self._stick_lxs is None and x < 0 and x < max(x_p - 2000, -32000): + self._stick_lxs = min(0, max(x + 2000, -31000)) _keypressed(lmode, lev) elif self._stick_lxs is not None and x >= self._stick_lxs: self._stick_lxs = None _keyreleased(lmode, lev) # bottom - if self._stick_bys is None and y < 0 and y < max(y_p - 600, -32200): - self._stick_bys = min(0, max(y + 600, -32000)) + if self._stick_bys is None and y < 0 and y < max(y_p - 2000, -32000): + self._stick_bys = min(0, max(y + 2000, -31000)) _keypressed(bmode, bev) elif self._stick_bys is not None and y >= self._stick_bys: self._stick_bys = None _keyreleased(bmode, bev) # right - if self._stick_rxs is None and x > 0 and x > min(x_p + 600, 32200): - self._stick_rxs = max(0, min(x - 600, 32000)) + if self._stick_rxs is None and x > 0 and x > min(x_p + 2000, 32000): + self._stick_rxs = max(0, min(x - 2000, 31000)) _keypressed(rmode, rev) elif self._stick_rxs is not None and x <= self._stick_rxs: self._stick_rxs = None |