Mercurial > sdl-ios-xcode
diff src/joystick/darwin/SDL_sysjoystick.c @ 2295:dbc6d1893869
Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
author | Bob Pendleton <bob@pendleton.com> |
---|---|
date | Tue, 08 Jan 2008 00:10:46 +0000 (2008-01-08) |
parents | 15a242fca6c4 |
children | 9e7f58b1b255 e1da92da346c 0906692aa6a4 |
line wrap: on
line diff
--- a/src/joystick/darwin/SDL_sysjoystick.c Thu Jan 03 06:07:30 2008 +0000 +++ b/src/joystick/darwin/SDL_sysjoystick.c Tue Jan 08 00:10:46 2008 +0000 @@ -820,9 +820,9 @@ 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: