From 62742cb880fa8358ad7f763ebc5c61d2c2c65ec0 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 20 Sep 2000 20:35:49 +0000 Subject: [PATCH] Joystick fixes from Tony. --- src/Joystick/joystick.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Joystick/joystick.cxx b/src/Joystick/joystick.cxx index 18a2d16b7..8fa31a44d 100644 --- a/src/Joystick/joystick.cxx +++ b/src/Joystick/joystick.cxx @@ -453,10 +453,11 @@ int fgJoystickRead() { int buttons; + float *axis_values = new float[MAX_AXES]; for (int i = 0; i < MAX_JOYSTICKS; i++) { jsJoystick * js = joysticks[i].js; - float *axis_values = new float[joysticks[i].naxes]; + // float *axis_values = new float[joysticks[i].naxes]; if (js->notWorking()) { continue; } @@ -555,14 +556,12 @@ fgJoystickRead() FG_LOG(FG_INPUT, FG_ALERT, "Failed to set value for " << jsNames[i] << ' ' << buttonNames[j]); } - - // -dw- cleanup - delete axis_values; - } + // -dw- cleanup + delete axis_values; + return true; } // end of joystick.cxx - -- 2.39.5