Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402704
This commit is contained in:
parent
6f2082d584
commit
e558eee568
13 changed files with 1484 additions and 105 deletions
|
@ -820,9 +820,9 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
|
|||
|
||||
range = (element->max - element->min + 1);
|
||||
value = HIDGetElementValue(device, element) - element->min;
|
||||
if (range == 4) /* 4 position hatswitch - scale up value */
|
||||
if (range == 4) /* 4 position hatswitch - scale up value */
|
||||
value *= 2;
|
||||
else if (range != 8) /* Neither a 4 nor 8 positions - fall back to default position (centered) */
|
||||
else if (range != 8) /* Neither a 4 nor 8 positions - fall back to default position (centered) */
|
||||
value = -1;
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue