From 5bdf27d159c131677ef64ba2760029288bcd24cd Mon Sep 17 00:00:00 2001 From: skidau Date: Tue, 14 Jun 2011 15:12:55 +0000 Subject: [PATCH] Adjusted the IPC_HLE timing to fix the stuck rumble problem in some games. Fixes issue 4532. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7597 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/SystemTimers.cpp | 5 +++-- Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Src/HW/SystemTimers.cpp b/Source/Core/Core/Src/HW/SystemTimers.cpp index 4d921cd18a..815fdde2a2 100644 --- a/Source/Core/Core/Src/HW/SystemTimers.cpp +++ b/Source/Core/Core/Src/HW/SystemTimers.cpp @@ -244,11 +244,12 @@ void Init() // AyuanX: TO BE TWEAKED // Now the 1500 is a pure assumption // We need to figure out the real frequency though - // PS: When this period is tweaked, the FreqDividerMote + // PS: When this period is tweaked, the interval // in WII_IPC_HLE_Device_usb.cpp should also be tweaked accordingly // to guarantee WiiMote updates at a fixed 100Hz + int interval = SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableWiimoteSpeaker?1250:1500; int fields = SConfig::GetInstance().m_LocalCoreStartupParameter.bVBeam?2:1; - IPC_HLE_PERIOD = GetTicksPerSecond() / (1500 * fields); + IPC_HLE_PERIOD = GetTicksPerSecond() / (interval * fields); } else { diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp index 8588eac0ba..0793900900 100644 --- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp @@ -190,7 +190,7 @@ bool Wiimote::Write() Report rpt; bool audio_written = false; - if (m_audio_reports.Pop(rpt) && !Core::g_CoreStartupParameter.bDisableWiimoteSpeaker) + if (m_audio_reports.Pop(rpt)) { IOWrite(rpt.first, rpt.second); delete[] rpt.first;