diff --git a/include/scheduler.hpp b/include/scheduler.hpp index 92328878d..5645f47d5 100644 --- a/include/scheduler.hpp +++ b/include/scheduler.hpp @@ -48,6 +48,8 @@ struct Scheduler { // Clear any pending events events.clear(); + addEvent(Scheduler::EventType::VBlank, arm11Clock / 60); + // Add a dummy event to always keep the scheduler non-empty addEvent(EventType::Panic, std::numeric_limits::max()); } diff --git a/src/emulator.cpp b/src/emulator.cpp index 1ac8d5b2c..c567cbc7a 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -48,7 +48,6 @@ void Emulator::reset(ReloadOption reload) { memory.reset(); // Reset scheduler and add a VBlank event scheduler.reset(); - scheduler.addEvent(Scheduler::EventType::VBlank, CPU::ticksPerSec / 60); // Kernel must be reset last because it depends on CPU/Memory state kernel.reset();