mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 19:34:39 +01:00
Display multi-mappings correctly in the mapping list
This commit is contained in:
1 parent
49a2c93b66
commit
8c9fee064e
3 files changed
+18
-8
No files matched your search
@@ -870,4 +870,18 @@ std::string MultiInputMapping::ToConfigString() const {
|
||||
return out;
|
||||
}
|
||||
|
||||
std::string MultiInputMapping::ToVisualString() const {
|
||||
std::string out;
|
||||
for (auto iter : mappings) {
|
||||
out += std::string(GetDeviceName(iter.deviceId)) + "." + GetKeyOrAxisName(iter) + " + ";
|
||||
}
|
||||
if (!out.empty()) {
|
||||
// remove the last ' + '
|
||||
out.pop_back();
|
||||
out.pop_back();
|
||||
out.pop_back();
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
} // KeyMap
|
||||
@@ -113,6 +113,8 @@ namespace KeyMap {
|
||||
static MultiInputMapping FromConfigString(const std::string &str);
|
||||
std::string ToConfigString() const;
|
||||
|
||||
std::string ToVisualString() const;
|
||||
|
||||
bool operator <(const MultiInputMapping &other) {
|
||||
for (size_t i = 0; i < mappings.capacity(); i++) {
|
||||
// If one ran out of entries, the other wins.
|
||||
|
||||
Reference in new issue
Block a user