Browse Source

Fixed some logic

Alex Szpakowski 11 years ago
parent
commit
4cd4d35739
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/modules/joystick/sdl/JoystickModule.cpp

+ 3 - 3
src/modules/joystick/sdl/JoystickModule.cpp

@@ -495,10 +495,10 @@ void JoystickModule::loadGamepadMappings(const std::string &mappings)
 			mapping.erase(pstartpos, pendpos - pstartpos + 1);
 		}
 
-		success = success || (SDL_GameControllerAddMapping(mapping.c_str()) != -1);
-
-		if (success)
+		if (SDL_GameControllerAddMapping(mapping.c_str()) != -1)
 		{
+			success = true;
+
 			// FIXME: massive hack until missing APIs are added to SDL 2:
 			// https://bugzilla.libsdl.org/show_bug.cgi?id=1975
 			std::string guid = mapping.substr(0, mapping.find_first_of(','));