From d5abc6343ec4e53c48fb7748fd4edac13de2f346 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Wed, 22 Apr 2026 21:20:53 +0200 Subject: [PATCH] =?UTF-8?q?fix(gamepad):=20no=20retallar=20el=20nom=20del?= =?UTF-8?q?=20mand=20a=2025=20car=C3=A0cters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/core/input/gamepad_manager.cpp | 1 - source/core/input/gamepad_manager.hpp | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/core/input/gamepad_manager.cpp b/source/core/input/gamepad_manager.cpp index fc1bdfc..a3c8fe1 100644 --- a/source/core/input/gamepad_manager.cpp +++ b/source/core/input/gamepad_manager.cpp @@ -56,7 +56,6 @@ auto GamepadManager::prettyName(const char* raw) -> std::string { const auto POS = name.find_first_of("(["); if (POS != std::string::npos) { name.erase(POS); } while (!name.empty() && name.back() == ' ') { name.pop_back(); } - if (name.size() > 25) { name.resize(25); } if (name.empty()) { name = "Gamepad"; } return name; } diff --git a/source/core/input/gamepad_manager.hpp b/source/core/input/gamepad_manager.hpp index 4081c25..781b2b4 100644 --- a/source/core/input/gamepad_manager.hpp +++ b/source/core/input/gamepad_manager.hpp @@ -60,8 +60,10 @@ class GamepadManager { GamepadManager() = default; ~GamepadManager() = default; - // Retalla `raw` al primer '(' o '[', elimina espais finals i talla - // a 25 caràcters. Fallback "Gamepad" si queda buit. + // Retalla `raw` al primer '(' o '[' i elimina espais finals per a + // llevar metadata verbosa ("Retroid Controller (vendor: 1001) ..."). + // Fallback "Gamepad" si queda buit. No limita l'amplada final — el + // Notifier multilinia ja gestiona noms llargs. [[nodiscard]] static auto prettyName(const char* raw) -> std::string; // Si `base` ja existeix al vector, afegeix " #2", " #3", ... fins que