[Commits] SDL: Removed unused variable.

libsdl.org revision control commits-owner at libsdl.org
Thu Sep 1 01:33:36 PDT 2011


details:   http://hg.libsdl.org/SDL/rev/b406b7d61494
changeset: 5858:b406b7d61494
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Thu Sep 01 04:31:58 2011 -0400
description:
Removed unused variable.

diffstat:

 src/joystick/SDL_joystick.c |  8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 772a7dbfbccf -r b406b7d61494 src/joystick/SDL_joystick.c
--- a/src/joystick/SDL_joystick.c	Thu Sep 01 04:31:01 2011 -0400
+++ b/src/joystick/SDL_joystick.c	Thu Sep 01 04:31:58 2011 -0400
@@ -38,7 +38,6 @@
 
 Uint8 SDL_numjoysticks = 0;
 SDL_Joystick **SDL_joysticks = NULL;
-static SDL_Joystick *default_joystick = NULL;
 
 int SDL_JoystickInit(void)
 {
@@ -58,7 +57,6 @@
 		}
 		status = 0;
 	}
-	default_joystick = NULL;
 	return(status);
 }
 
@@ -199,9 +197,6 @@
 	int valid;
 
 	if ( *joystick == NULL ) {
-		*joystick = default_joystick;
-	}
-	if ( *joystick == NULL ) {
 		SDL_SetError("Joystick hasn't been opened yet");
 		valid = 0;
 	} else {
@@ -369,9 +364,6 @@
 	/* Lock the event queue - prevent joystick polling */
 	SDL_Lock_EventThread();
 
-	if ( joystick == default_joystick ) {
-		default_joystick = NULL;
-	}
 	SDL_SYS_JoystickClose(joystick);
 
 	/* Remove joystick from list */


More information about the commits mailing list