From 1811d005681919245c69545e611bd6c24c6a968c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 28 Jan 2013 19:36:25 +0900 Subject: [PATCH] Use the correct index for pressing an axis button. Oops. --- libs/video/targets/joy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/video/targets/joy.c b/libs/video/targets/joy.c index 0cd885478..5821683d9 100644 --- a/libs/video/targets/joy.c +++ b/libs/video/targets/joy.c @@ -98,8 +98,10 @@ joy_check_axis_buttons (struct joy_axis *ja, float value) // press the active button if there is one if (pressed >= 0) { // FIXME support repeat? - if (!ab->state) + ab = &ja->axis_buttons[pressed]; + if (!ab->state) { Key_Event (ab->key, 0, 1); + } ab->state = 1; } }