diff options
| author | mathieui <mathieui@mathieui.net> | 2016-05-03 00:50:53 +0200 |
|---|---|---|
| committer | mathieui <mathieui@mathieui.net> | 2016-05-12 10:45:03 +0200 |
| commit | 2a0ba5aaa626f9334f16f4e4d84db7afa0358359 (patch) | |
| tree | 0cb40904a9aa3bf4b63fd2f95d30cf6094642170 /Source/Core | |
| parent | b7795044bbfc71bf57370ab02ff1346434484ffc (diff) | |
Fix loading save states with input recording with the adapter
Intended fix for issue #9508
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Movie.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index 0fdc5cfcdb..3c9e4fa24d 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -406,17 +406,28 @@ void ChangePads(bool instantly) int controllers = 0; 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); if (instantly && (s_numPads & 0x0F) == controllers) return; 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 - SerialInterface::AddDevice(IsUsingPad(i) ? (IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i); + SerialInterface::AddDevice(device, i); else - SerialInterface::ChangeDevice(IsUsingPad(i) ? (IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i); + SerialInterface::ChangeDevice(device, i); + } } void ChangeWiiPads(bool instantly) |
