Browse Source

Removed some redundant code.

--HG--
branch : minor
Alex Szpakowski 10 years ago
parent
commit
5932c39c86
1 changed files with 1 additions and 11 deletions
  1. 1 11
      src/modules/joystick/sdl/Joystick.cpp

+ 1 - 11
src/modules/joystick/sdl/Joystick.cpp

@@ -122,17 +122,7 @@ bool Joystick::isConnected() const
 
 const char *Joystick::getName() const
 {
-	// Use the saved name if this Joystick isn't connected anymore.
-	if (!isConnected())
-		return name.c_str();
-
-	// Prefer the Joystick name for consistency.
-	const char *joyname = SDL_JoystickName(joyhandle);
-
-	if (!joyname && isGamepad())
-		joyname = SDL_GameControllerName(controller);
-
-	return joyname;
+	return name.c_str();
 }
 
 int Joystick::getAxisCount() const