diff --git a/source/sections/title.cpp b/source/sections/title.cpp index b08b7ef..69122d1 100644 --- a/source/sections/title.cpp +++ b/source/sections/title.cpp @@ -345,28 +345,12 @@ void Title::swapKeyboard() { // Muestra información sobre los controles y los jugadores void Title::showControllers() { - /* // Crea vectores de texto vacíos para un número máximo de mandos - constexpr size_t NUM_CONTROLLERS = 2; - std::vector text(NUM_CONTROLLERS); - std::vector player_controller_index(NUM_CONTROLLERS, -1); - - // Obtiene de cada jugador el índice del mando que tiene asignado - for (size_t i = 0; i < NUM_CONTROLLERS; ++i) { - // Ejemplo: el jugador 1 tiene el mando 2 - player_controller_index.at(Options::controllers.at(i)->player_id - 1) = i; - } - - // Genera el texto correspondiente - for (size_t i = 0; i < NUM_CONTROLLERS; ++i) { - const size_t INDEX = player_controller_index.at(i); - if (Options::controllers.at(INDEX).plugged) { - text.at(i) = Lang::getText("[DEFINE_BUTTONS] PLAYER") + std::to_string(i + 1) + ": " + Options::controllers.at(INDEX).name; - } - } - - // Muestra la notificación - Notifier::get()->show({text.at(0), text.at(1)}); - */ + // Crea los textos + std::string text1 = Lang::getText("[DEFINE_BUTTONS] PLAYER") + std::to_string(static_cast(Player::Id::PLAYER1)) + ": " + Options::gamepad_manager.getGamepad(Player::Id::PLAYER1).name; + std::string text2 = Lang::getText("[DEFINE_BUTTONS] PLAYER") + std::to_string(static_cast(Player::Id::PLAYER2)) + ": " + Options::gamepad_manager.getGamepad(Player::Id::PLAYER2).name; + + // Muestra la notificación + Notifier::get()->show({text1, text2}); } // Actualiza el fade