mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-09 09:51:29 -06:00
Stop replacing non-duplicate controllers
This commit is contained in:
parent
4c93d4bde5
commit
ff7da398c5
@ -49,12 +49,17 @@ std::vector<std::shared_ptr<ControllerBase>> WiimoteControllerProvider::get_cont
|
||||
ssize_t lowestReplaceableIndex = -1;
|
||||
for (ssize_t i = m_wiimotes.size() - 1; i >= 0; --i)
|
||||
{
|
||||
const auto& wiimote = m_wiimotes[i];
|
||||
if (wiimote.device && *wiimote.device == *device)
|
||||
const auto& wiimoteDevice = m_wiimotes[i].device;
|
||||
if (wiimoteDevice)
|
||||
{
|
||||
isDuplicate = true;
|
||||
break;
|
||||
if (*wiimoteDevice == *device)
|
||||
{
|
||||
isDuplicate = true;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
lowestReplaceableIndex = i;
|
||||
}
|
||||
if (isDuplicate)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user