mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 23:11: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;
|
ssize_t lowestReplaceableIndex = -1;
|
||||||
for (ssize_t i = m_wiimotes.size() - 1; i >= 0; --i)
|
for (ssize_t i = m_wiimotes.size() - 1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
const auto& wiimote = m_wiimotes[i];
|
const auto& wiimoteDevice = m_wiimotes[i].device;
|
||||||
if (wiimote.device && *wiimote.device == *device)
|
if (wiimoteDevice)
|
||||||
{
|
{
|
||||||
isDuplicate = true;
|
if (*wiimoteDevice == *device)
|
||||||
break;
|
{
|
||||||
|
isDuplicate = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
lowestReplaceableIndex = i;
|
lowestReplaceableIndex = i;
|
||||||
}
|
}
|
||||||
if (isDuplicate)
|
if (isDuplicate)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue