From 5bf8aaf846c4ecd50f348a5ac3ba37f453fce4f3 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 3 Feb 2024 16:43:47 +0100 Subject: [PATCH] Fixed an issue where the custom collection editing popup did not show the correct button name if the controller type was a PlayStation variant Also fixed an issue where the popup did not consider the button swap setting --- es-app/src/CollectionSystemsManager.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 6f93ca2a0..300cd600c 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -634,8 +634,31 @@ void CollectionSystemsManager::setEditMode(const std::string& collectionName, bo mEditingCollectionSystemData = sysData; if (showPopup) { + const std::string controllerType { + Settings::getInstance()->getString("InputControllerType")}; + std::string editButton; + + if (controllerType == "ps123" || controllerType == "ps4" || controllerType == "ps5") { +#if defined(_MSC_VER) // MSVC compiler. + if (Settings::getInstance()->getBool("InputSwapButtons")) + editButton = Utils::String::wideStringToString(L"\uF04D"); // Square. + else + editButton = Utils::String::wideStringToString(L"\uF0D8"); // Triangle. +#else + if (Settings::getInstance()->getBool("InputSwapButtons")) + editButton = "\uF04D"; // Square. + else + editButton = "\uF0D8"; // Triangle. +#endif + } + else { + if (Settings::getInstance()->getBool("InputSwapButtons")) + editButton = "'X'"; + else + editButton = "'Y'"; + } mWindow->queueInfoPopup("EDITING '" + Utils::String::toUpper(collectionName) + - "' COLLECTION, ADD/REMOVE GAMES WITH 'Y'", + "' COLLECTION, ADD/REMOVE GAMES WITH " + editButton, 10000); } }