commit de acabar la jornada laboral

This commit is contained in:
2024-10-17 13:57:41 +02:00
parent db884cb422
commit 59de566c5b
24 changed files with 78 additions and 274 deletions

View File

@@ -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
}
}