diff options
| author | Scott Mansell <phiren@gmail.com> | 2016-04-10 00:10:56 +1200 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2016-04-10 00:10:56 +1200 |
| commit | 28e0607522ea46cfbced8cb9d86cf3ec7bcbce36 (patch) | |
| tree | 3892b8153125b4f67a2451a18ba8852f20fa19d7 /Source/Core | |
| parent | 94098a50c2a6c6eb76ed27b5ea9e5f9b69a459bc (diff) | |
Fix Metroid: Other M
During boot of Other M, there is momentarily a period when VICallback's
cycles late is larger than GetTicksPerHalfLine(). Because
GetTicksPerHalfLine() returns a u32 and c++'s weird type promotion rules,
cycleslate gets promoted from a s32 to a u32 and the result of the
substraction is a really large u32.
Before ScheduleEvent accuracy improvements, ScheduleEvent took a s32, so
the result got cast back to the small negitave we expect. But it now takes
a s64 and the u32 to s64 conversion gives us a really large number (around
two seconds) and Other M times out while waiting for something.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/SystemTimers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Core/HW/SystemTimers.cpp b/Source/Core/Core/HW/SystemTimers.cpp index e900e33762..a46110775d 100644 --- a/Source/Core/Core/HW/SystemTimers.cpp +++ b/Source/Core/Core/HW/SystemTimers.cpp @@ -118,7 +118,7 @@ static void IPC_HLE_UpdateCallback(u64 userdata, int cyclesLate) static void VICallback(u64 userdata, int cyclesLate) { VideoInterface::Update(); - CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerHalfLine() - cyclesLate, et_VI); + CoreTiming::ScheduleEvent(s64(VideoInterface::GetTicksPerHalfLine()) - cyclesLate, et_VI); } static void DecrementerCallback(u64 userdata, int cyclesLate) |
