Minor change; correctly report all joystick bindings in Edit Controls screen

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2426 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2006-09-05 06:52:17 +00:00
parent 127bf24b30
commit 108f0db842
+5 -1
View File
@@ -388,9 +388,13 @@ InterrogateInputState (int template, int control, int index, char *buffer, int m
buffer[maxlen-1] = 0;
break;
case VCONTROL_JOYBUTTON:
snprintf (buffer, maxlen, "[Button %d]", g.gesture.button.index + 1);
snprintf (buffer, maxlen, "[J%d B%d]", g.gesture.button.port, g.gesture.button.index + 1);
buffer[maxlen-1] = 0;
break;
case VCONTROL_JOYAXIS:
snprintf (buffer, maxlen, "[J%d A%d %c]", g.gesture.axis.port, g.gesture.axis.index, g.gesture.axis.polarity > 0 ? '+' : '-');
case VCONTROL_JOYHAT:
snprintf (buffer, maxlen, "[J%d H%d %d]", g.gesture.hat.port, g.gesture.hat.index, g.gesture.hat.dir);
default:
/* Something we don't handle yet */
buffer[0] = 0;