mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Fix loading save states with input recording with the adapter
Intended fix for issue #9508
This commit is contained in:
parent
b7795044bb
commit
2a0ba5aaa6
@ -406,17 +406,28 @@ void ChangePads(bool instantly)
|
|||||||
int controllers = 0;
|
int controllers = 0;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_SI_CHANNELS; ++i)
|
for (int i = 0; i < MAX_SI_CHANNELS; ++i)
|
||||||
if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER || SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_TARUKONGA)
|
if (SIDevice_IsGCController(SConfig::GetInstance().m_SIDevice[i]))
|
||||||
controllers |= (1 << i);
|
controllers |= (1 << i);
|
||||||
|
|
||||||
if (instantly && (s_numPads & 0x0F) == controllers)
|
if (instantly && (s_numPads & 0x0F) == controllers)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_SI_CHANNELS; ++i)
|
for (int i = 0; i < MAX_SI_CHANNELS; ++i)
|
||||||
|
{
|
||||||
|
SIDevices device = SIDEVICE_NONE;
|
||||||
|
if (IsUsingPad(i))
|
||||||
|
{
|
||||||
|
if (SIDevice_IsGCController(SConfig::GetInstance().m_SIDevice[i]))
|
||||||
|
device = SConfig::GetInstance().m_SIDevice[i];
|
||||||
|
else
|
||||||
|
device = IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER;
|
||||||
|
}
|
||||||
|
|
||||||
if (instantly) // Changes from savestates need to be instantaneous
|
if (instantly) // Changes from savestates need to be instantaneous
|
||||||
SerialInterface::AddDevice(IsUsingPad(i) ? (IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
|
SerialInterface::AddDevice(device, i);
|
||||||
else
|
else
|
||||||
SerialInterface::ChangeDevice(IsUsingPad(i) ? (IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
|
SerialInterface::ChangeDevice(device, i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChangeWiiPads(bool instantly)
|
void ChangeWiiPads(bool instantly)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user