mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
CoreTiming: Fix 31bit overflow for events scheduling.
Events scheduled more than 4.12 seconds in the future (2.96 seconds for Wii games) would overflow the sign bit and get scheduled in the past instead, causing them to fire instantly.
This commit is contained in:
@ -45,11 +45,11 @@ int RegisterEvent(const std::string& name, TimedCallback callback);
|
||||
void UnregisterAllEvents();
|
||||
|
||||
// userdata MAY NOT CONTAIN POINTERS. userdata might get written and reloaded from savestates.
|
||||
void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||
void ScheduleEvent(s64 cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||
void ScheduleEvent_Immediate(int event_type, u64 userdata = 0);
|
||||
void ScheduleEvent_Threadsafe(int cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||
void ScheduleEvent_Threadsafe(s64 cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||
void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata = 0);
|
||||
void ScheduleEvent_AnyThread(int cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||
void ScheduleEvent_AnyThread(s64 cyclesIntoFuture, int event_type, u64 userdata = 0);
|
||||
|
||||
// We only permit one event of each type in the queue at a time.
|
||||
void RemoveEvent(int event_type);
|
||||
@ -77,7 +77,7 @@ void SetFakeTBStartValue(u64 val);
|
||||
u64 GetFakeTBStartTicks();
|
||||
void SetFakeTBStartTicks(u64 val);
|
||||
|
||||
void ForceExceptionCheck(int cycles);
|
||||
void ForceExceptionCheck(s64 cycles);
|
||||
|
||||
extern int slicelength;
|
||||
extern float lastOCFactor;
|
||||
|
Reference in New Issue
Block a user