mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 06:51:18 +12:00
Stop replacing non-duplicate controllers
This commit is contained in:
parent
e14c54b846
commit
8ba4b051a1
1 changed files with 9 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue