mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
WiimoteReal: fix multiple Wiimotes on OS X
This commit is contained in:
@ -322,11 +322,12 @@ void WiimoteDarwin::DisablePowerAssertionInternal()
|
|||||||
|
|
||||||
for (int i = 0; i < MAX_WIIMOTES; i++)
|
for (int i = 0; i < MAX_WIIMOTES; i++)
|
||||||
{
|
{
|
||||||
if (WiimoteReal::g_wiimotes[i] == nullptr)
|
|
||||||
continue;
|
|
||||||
wm = static_cast<WiimoteReal::WiimoteDarwin*>(WiimoteReal::g_wiimotes[i]);
|
wm = static_cast<WiimoteReal::WiimoteDarwin*>(WiimoteReal::g_wiimotes[i]);
|
||||||
if ([device isEqual: wm->m_btd] != TRUE)
|
if (!wm)
|
||||||
wm = nullptr;
|
continue;
|
||||||
|
if ([device isEqual: wm->m_btd])
|
||||||
|
break;
|
||||||
|
wm = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wm == nullptr) {
|
if (wm == nullptr) {
|
||||||
@ -361,11 +362,12 @@ void WiimoteDarwin::DisablePowerAssertionInternal()
|
|||||||
|
|
||||||
for (int i = 0; i < MAX_WIIMOTES; i++)
|
for (int i = 0; i < MAX_WIIMOTES; i++)
|
||||||
{
|
{
|
||||||
if (WiimoteReal::g_wiimotes[i] == nullptr)
|
|
||||||
continue;
|
|
||||||
wm = static_cast<WiimoteReal::WiimoteDarwin*>(WiimoteReal::g_wiimotes[i]);
|
wm = static_cast<WiimoteReal::WiimoteDarwin*>(WiimoteReal::g_wiimotes[i]);
|
||||||
if ([device isEqual: wm->m_btd] != TRUE)
|
if (!wm)
|
||||||
wm = nullptr;
|
continue;
|
||||||
|
if ([device isEqual: wm->m_btd])
|
||||||
|
break;
|
||||||
|
wm = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wm == nullptr) {
|
if (wm == nullptr) {
|
||||||
|
Reference in New Issue
Block a user