fix: xicotets errors al codi que he detectat al canviar de SO

This commit is contained in:
2025-06-07 09:15:49 +02:00
parent 767d38e170
commit 09b182c187
4 changed files with 6 additions and 6 deletions

View File

@@ -1732,7 +1732,7 @@ void Game::initPlayers(int player_id)
players_.emplace_back(std::make_unique<Player>(2, param.game.play_area.third_quarter_x - 15, y, demo_.enabled, param.game.play_area.rect, player_textures_[1], player_animations_)); players_.emplace_back(std::make_unique<Player>(2, param.game.play_area.third_quarter_x - 15, y, demo_.enabled, param.game.play_area.rect, player_textures_[1], player_animations_));
players_.back()->setScoreBoardPanel(SCOREBOARD_RIGHT_PANEL); players_.back()->setScoreBoardPanel(SCOREBOARD_RIGHT_PANEL);
players_.back()->setName(lang::getText("SCOREBOARD_53")); players_.back()->setName(lang::getText("SCOREBOARD_54"));
players_.back()->setController(getController(players_.back()->getId())); players_.back()->setController(getController(players_.back()->getId()));
// Activa el jugador que coincide con el "player_id" // Activa el jugador que coincide con el "player_id"

View File

@@ -31,7 +31,7 @@ namespace globalInputs
// Si la notificación de salir no está activa, muestra la notificación // Si la notificación de salir no está activa, muestra la notificación
#ifdef ARCADE #ifdef ARCADE
const std::string TEXT = code == section::Options::QUIT_WITH_CONTROLLER ? lang::getText("NOTIFICATIONS_116") : lang::getText("NOTIFICATIONS_94"); const std::string TEXT = code == section::Options::QUIT_WITH_CONTROLLER ? lang::getText("NOTIFICATIONS_116") : lang::getText("NOTIFICATIONS_94");
Notifier::get()->show(TEXT, std::string()}, -1, CODE); Notifier::get()->show({TEXT, std::string()}, -1, CODE);
#else #else
Notifier::get()->show({lang::getText("NOTIFICATIONS_94"), std::string()}, -1, CODE); Notifier::get()->show({lang::getText("NOTIFICATIONS_94"), std::string()}, -1, CODE);
#endif #endif

View File

@@ -4,6 +4,7 @@
#include <SDL3/SDL_pixels.h> // Para SDL_PIXELFORMAT_RGBA8888 #include <SDL3/SDL_pixels.h> // Para SDL_PIXELFORMAT_RGBA8888
#include <SDL3/SDL_timer.h> // Para SDL_GetTicks #include <SDL3/SDL_timer.h> // Para SDL_GetTicks
#include <algorithm> // Para max #include <algorithm> // Para max
#include <array> // Para array
#include <utility> // Para move #include <utility> // Para move
#include <vector> // Para vector #include <vector> // Para vector
#include "fade.h" // Para Fade, FadeMode, FadeType #include "fade.h" // Para Fade, FadeMode, FadeType
@@ -144,9 +145,8 @@ void Instructions::fillTexture()
lang::getText("INSTRUCTIONS_18"), lang::getText("INSTRUCTIONS_18"),
lang::getText("INSTRUCTIONS_19"), lang::getText("INSTRUCTIONS_19"),
lang::getText("INSTRUCTIONS_20"), lang::getText("INSTRUCTIONS_20"),
lang::getText("INSTRUCTIONS_21") lang::getText("INSTRUCTIONS_21")};
}; for (const auto &desc : ITEM_DESCRIPTIONS)
for (const auto& desc : ITEM_DESCRIPTIONS)
{ {
const int l = text_->lenght(desc); const int l = text_->lenght(desc);
lenght = l > lenght ? l : lenght; lenght = l > lenght ? l : lenght;

View File

@@ -171,7 +171,7 @@ void ServiceMenu::setSelectorUp()
{ {
if (display_options_.empty()) if (display_options_.empty())
return; return;
selected_ = (selected_ > 0) ? --selected_ : display_options_.size() - 1; selected_ = (selected_ > 0) ? selected_ - 1 : display_options_.size() - 1;
playMenuSound(); playMenuSound();
} }