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:
Bob Pendleton 2008-01-08 00:10:46 +00:00
parent 6f2082d584
commit e558eee568
13 changed files with 1484 additions and 105 deletions

View file

@ -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: