Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-05-17 23:53:17 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-05-18 00:41:57 +0300
commitec5328aa42fdc72de4b79fcf1b39046d6b85360d (patch)
tree79d40adbdadce3df72277ee34a32bf46e88458b4 /clovercon/clovercon.c
parent7b98fe3d373f595cffa17df70fb6dcc335842285 (diff)
clovercon driver update - it's possible to use analog stick for all our features like home combination, etc.
Diffstat (limited to 'clovercon/clovercon.c')
-rw-r--r--clovercon/clovercon.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clovercon/clovercon.c b/clovercon/clovercon.c
index ef3f90d0..53cacaca 100644
--- a/clovercon/clovercon.c
+++ b/clovercon/clovercon.c
@@ -629,10 +629,10 @@ static void clovercon_poll(struct input_polled_dev *polled_dev) {
if (b) buttons_state |= (1 << 1);
if (select) buttons_state |= (1 << 2);
if (start) buttons_state |= (1 << 3);
- if (up) buttons_state |= (1 << 4);
- if (down) buttons_state |= (1 << 5);
- if (left) buttons_state |= (1 << 6);
- if (right) buttons_state |= (1 << 7);
+ if (up || (jy < -DEAD_ZONE)) buttons_state |= (1 << 4);
+ if (down || (jy > DEAD_ZONE)) buttons_state |= (1 << 5);
+ if (left || (jx < -DEAD_ZONE)) buttons_state |= (1 << 6);
+ if (right || (jx > DEAD_ZONE)) buttons_state |= (1 << 7);
if (x) buttons_state |= (1 << 8);
if (y) buttons_state |= (1 << 9);
if (l) buttons_state |= (1 << 10);