Fixed C variable declarations
authorSam Lantinga <slouken@libsdl.org>
Mon, 11 Feb 2013 18:13:52 -0800
changeset 6850 ad3416a14319
parent 6849 b9dcf6242476
child 6851 a58fc7ff4a0f
Fixed C variable declarations
src/joystick/SDL_gamecontroller.c
--- a/src/joystick/SDL_gamecontroller.c	Mon Feb 11 17:40:09 2013 -0800
+++ b/src/joystick/SDL_gamecontroller.c	Mon Feb 11 18:13:52 2013 -0800
@@ -129,9 +129,11 @@
 	{
 	case SDL_JOYAXISMOTION:
 		{
+			SDL_GameController *controllerlist;
+
 			if ( event->jaxis.axis >= k_nMaxReverseEntries ) break;
 
-			SDL_GameController *controllerlist = SDL_gamecontrollers;
+			controllerlist = SDL_gamecontrollers;
 			while ( controllerlist )
 			{
 				if ( controllerlist->joystick->instance_id == event->jaxis.which )
@@ -153,9 +155,11 @@
 	case SDL_JOYBUTTONDOWN:
 	case SDL_JOYBUTTONUP:
 		{
+			SDL_GameController *controllerlist;
+
 			if ( event->jbutton.button >= k_nMaxReverseEntries ) break;
 
-			SDL_GameController *controllerlist = SDL_gamecontrollers;
+			controllerlist = SDL_gamecontrollers;
 			while ( controllerlist )
 			{
 				if ( controllerlist->joystick->instance_id == event->jbutton.which )
@@ -176,9 +180,11 @@
 		break;
 	case SDL_JOYHATMOTION:
 		{
+			SDL_GameController *controllerlist;
+
 			if ( event->jhat.hat >= 4 ) break;
 
-			SDL_GameController *controllerlist = SDL_gamecontrollers;
+			controllerlist = SDL_gamecontrollers;
 			while ( controllerlist )
 			{
 				if ( controllerlist->joystick->instance_id == event->jhat.which )