mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Core: Track names of connected pad devices.
Rather than just that it's a pad. This tries to get the identifier if possible.
This commit is contained in:
1 parent
75bae070de
commit
536c050943
8 files changed
+60
-14
No files matched your search
+3
-1
@@ -40,6 +40,7 @@ KeyMapping g_controllerMap;
|
||||
// Incremented on modification, so we know when to update menus.
|
||||
int g_controllerMapGeneration = 0;
|
||||
std::set<std::string> g_seenPads;
|
||||
std::map<int, std::string> g_padNames;
|
||||
std::set<int> g_seenDeviceIds;
|
||||
|
||||
bool g_swapped_keys = false;
|
||||
@@ -762,8 +763,9 @@ bool HasBuiltinController(const std::string &name) {
|
||||
return IsOuya(name) || IsXperiaPlay(name) || IsNvidiaShield(name) || IsMOQII7S(name) || IsRetroid(name);
|
||||
}
|
||||
|
||||
void NotifyPadConnected(const std::string &name) {
|
||||
void NotifyPadConnected(int deviceId, const std::string &name) {
|
||||
g_seenPads.insert(name);
|
||||
g_padNames[deviceId] = name;
|
||||
}
|
||||
|
||||
void AutoConfForPad(const std::string &name) {
|
||||
|
||||
Reference in new issue
Block a user