mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
CoreTiming: Fix scheduling into the past
ForceExceptionCheck messes up the downcount and slice length if the callback is scheduled into the past (g_slice_length becomes negative)
This commit is contained in:
@ -241,6 +241,13 @@ TEST(CoreTiming, ScheduleIntoPast)
|
||||
CoreTiming::g_global_timer += 1000;
|
||||
Core::DeclareAsCPUThread();
|
||||
AdvanceAndCheck(1, MAX_SLICE_LENGTH, MAX_SLICE_LENGTH + 1000);
|
||||
|
||||
// Schedule directly into the past from the CPU.
|
||||
// This shouldn't happen in practice, but it's best if we don't mess up the slice length and
|
||||
// downcount if we do.
|
||||
CoreTiming::ScheduleEvent(-1000, s_cb_next, CB_IDS[0]);
|
||||
EXPECT_EQ(0, PowerPC::ppcState.downcount);
|
||||
AdvanceAndCheck(0, MAX_SLICE_LENGTH, 1000);
|
||||
}
|
||||
|
||||
TEST(CoreTiming, Overclocking)
|
||||
|
Reference in New Issue
Block a user