From 396c12ee73193f4ac3665ecac2f634fc0b046697 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 16:46:21 +0000 Subject: Fixes for unsafe string handling, variable scoping errors. --- nGenEx/Joystick.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nGenEx/Joystick.cpp') diff --git a/nGenEx/Joystick.cpp b/nGenEx/Joystick.cpp index ba3b3ae..a2b80af 100644 --- a/nGenEx/Joystick.cpp +++ b/nGenEx/Joystick.cpp @@ -61,10 +61,10 @@ Joystick::Joystick() for (int i = 0; i < MotionController::MaxActions; i++) action[i] = false; - for (i = 0; i < KEY_MAP_SIZE; i++) + for (int i = 0; i < KEY_MAP_SIZE; i++) map[i] = 0; - for (i = 0; i < 4; i++) { + for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { hat[i][j] = false; } @@ -524,7 +524,7 @@ Joystick::Acquire() for (int i = 0; i < MotionController::MaxActions; i++) action[i] = false; - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) hat[i][j] = false; @@ -585,7 +585,7 @@ Joystick::Acquire() ProcessAxes(joy_x, joy_y, joy_r, joy_t); - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) ProcessHat(i, joystate.rgdwPOV[i]); acquired = true; -- cgit v1.1