Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183138
b: refs/heads/master
c: 315543f
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Feb 22, 2010
1 parent 679eda7 commit 38d1570
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d38fcb9690532e6e2e064d711262b14d638113b9
refs/heads/master: 315543fd112ae3b573bc44e7dbfef99c11714610
12 changes: 8 additions & 4 deletions trunk/drivers/input/joystick/gamecon.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,10 @@ static void gc_psx_report_one(struct gc *gc, struct input_dev *dev,
input_report_abs(dev, gc_psx_abs[i + 2],
data[i + 2]);

input_report_abs(dev, ABS_X, 128 + !(data[0] & 0x20) * 127 - !(data[0] & 0x80) * 128);
input_report_abs(dev, ABS_Y, 128 + !(data[0] & 0x40) * 127 - !(data[0] & 0x10) * 128);
input_report_abs(dev, ABS_X,
!!(data[0] & 0x80) * 128 + !(data[0] & 0x20) * 127);
input_report_abs(dev, ABS_Y,
!!(data[0] & 0x10) * 128 + !(data[0] & 0x40) * 127);
}

for (i = 0; i < 8; i++)
Expand All @@ -650,8 +652,10 @@ static void gc_psx_report_one(struct gc *gc, struct input_dev *dev,
input_report_key(dev, gc_psx_ddr_btn[i],
~data[0] & (0x10 << i));
} else {
input_report_abs(dev, ABS_X, 128 + !(data[0] & 0x20) * 127 - !(data[0] & 0x80) * 128);
input_report_abs(dev, ABS_Y, 128 + !(data[0] & 0x40) * 127 - !(data[0] & 0x10) * 128);
input_report_abs(dev, ABS_X,
!!(data[0] & 0x80) * 128 + !(data[0] & 0x20) * 127);
input_report_abs(dev, ABS_Y,
!!(data[0] & 0x10) * 128 + !(data[0] & 0x40) * 127);

/*
* For some reason if the extra axes are left unset
Expand Down

0 comments on commit 38d1570

Please sign in to comment.