mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-25 14:54:56 +00:00
Merge pull request #9795 from Filoppi/fix_controller2_default_device
Fix controllers after the first one not defaulting to the default device
This commit is contained in:
commit
0aa9e8dc9a
1 changed files with 17 additions and 2 deletions
|
@ -145,8 +145,23 @@ bool InputConfig::LoadConfig(bool isGC)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_controllers[0]->LoadDefaults(g_controller_interface);
|
// Only load the default profile for the first controller,
|
||||||
m_controllers[0]->UpdateReferences(g_controller_interface);
|
// otherwise they would all share the same mappings and default device
|
||||||
|
if (m_controllers.size() > 0)
|
||||||
|
{
|
||||||
|
m_controllers[0]->LoadDefaults(g_controller_interface);
|
||||||
|
m_controllers[0]->UpdateReferences(g_controller_interface);
|
||||||
|
}
|
||||||
|
// Set the "default" default device for all other controllers, or they would end up
|
||||||
|
// having no default device (which is fine, but might be confusing for some users)
|
||||||
|
const std::string& default_device_string = g_controller_interface.GetDefaultDeviceString();
|
||||||
|
if (!default_device_string.empty())
|
||||||
|
{
|
||||||
|
for (size_t i = 1; i < m_controllers.size(); ++i)
|
||||||
|
{
|
||||||
|
m_controllers[i]->SetDefaultDevice(default_device_string);
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue