diff --git a/src/core/controller.cpp b/src/core/controller.cpp index 1fdfbc47a..4608f2528 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -238,6 +238,12 @@ const char* Controller::GetPortDisplayName(u32 port, u32 slot, bool mtap) return mtap ? mtap_labels[port][slot] : no_mtap_labels[port]; } +const char* Controller::GetPortDisplayName(u32 index) +{ + const auto& [port, slot] = ConvertPadToPortAndSlot(index); + return GetPortDisplayName(port, slot, g_settings.IsMultitapPortEnabled(port)); +} + std::string Controller::GetSettingsSection(u32 pad) { return fmt::format("Pad{}", pad + 1u); diff --git a/src/core/controller.h b/src/core/controller.h index bf2bc766d..9ff91a88c 100644 --- a/src/core/controller.h +++ b/src/core/controller.h @@ -139,6 +139,7 @@ public: /// Returns a printable label for a given port. static const char* GetPortDisplayName(u32 port, u32 slot, bool mtap); + static const char* GetPortDisplayName(u32 index); /// List of controller indices in the order that they should be displayed. static const std::array PortDisplayOrder;