summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2011-06-14 15:12:55 +0000
committerskidau <skidau@gmail.com>2011-06-14 15:12:55 +0000
commit5bdf27d159c131677ef64ba2760029288bcd24cd (patch)
treef5c4613343d3d4b22442fdaf4d94410a6c3d7fd6 /Source
parent98536df915ef836a8225cb9698ca7d4790660b3f (diff)
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
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Src/HW/SystemTimers.cpp5
-rw-r--r--Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp2
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;