From 5c08e97b0b30b829e58356d082ebfa3261279718 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 28 Jan 2013 19:36:54 +0900 Subject: [PATCH] Ensure the axis button's state starts at 0. realloc doesn't do that for us. --- libs/video/targets/joy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/video/targets/joy.c b/libs/video/targets/joy.c index 5821683d9..56b99d322 100644 --- a/libs/video/targets/joy.c +++ b/libs/video/targets/joy.c @@ -300,6 +300,7 @@ in_joy_button_add_f (int ax, int index) joy_axes[ax].axis_buttons = realloc (joy_axes[ax].axis_buttons, size); joy_axes[ax].axis_buttons[n].key = keynum; joy_axes[ax].axis_buttons[n].threshold = threshold; + joy_axes[ax].axis_buttons[n].state = 0; } static void