commit de acabar la jornada laboral
This commit is contained in:
@@ -396,11 +396,9 @@ bool Input::discoverGameControllers()
|
||||
|
||||
if (SDL_GameControllerAddMappingsFromFile(game_controller_db_path_.c_str()) < 0)
|
||||
{
|
||||
#ifdef VERBOSE
|
||||
{
|
||||
std::cout << "Error, could not load " << game_controller_db_path_.c_str() << " file: " << SDL_GetError() << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
num_joysticks_ = SDL_NumJoysticks();
|
||||
@@ -418,12 +416,10 @@ bool Input::discoverGameControllers()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VERBOSE
|
||||
{
|
||||
std::cout << "\nChecking for game controllers...\n";
|
||||
std::cout << num_joysticks_ << " joysticks found, " << num_gamepads_ << " are gamepads\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
if (num_gamepads_ > 0)
|
||||
{
|
||||
@@ -437,20 +433,16 @@ bool Input::discoverGameControllers()
|
||||
{
|
||||
connected_controllers_.push_back(pad);
|
||||
const std::string name = SDL_GameControllerNameForIndex(i);
|
||||
#ifdef VERBOSE
|
||||
{
|
||||
std::cout << name << std::endl;
|
||||
}
|
||||
#endif
|
||||
controller_names_.push_back(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef VERBOSE
|
||||
{
|
||||
std::cout << "SDL_GetError() = " << SDL_GetError() << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user