From e47f0b8feb115d58a931a1e3864117683531ddee Mon Sep 17 00:00:00 2001 From: Sour Date: Wed, 8 Jul 2020 21:07:00 -0400 Subject: [PATCH] Debugger: Lua - Allow regular start/end frame events to work normally when in GB-only mode Allows reusing identical scripts between both GB and SNES modes --- Core/Debugger.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Core/Debugger.cpp b/Core/Debugger.cpp index 6d09df2..35eb81a 100644 --- a/Core/Debugger.cpp +++ b/Core/Debugger.cpp @@ -329,9 +329,18 @@ void Debugger::ProcessEvent(EventType type) break; case EventType::GbStartFrame: + if(_settings->CheckFlag(EmulationFlags::GameboyMode)) { + _scriptManager->ProcessEvent(EventType::StartFrame); + } _console->GetNotificationManager()->SendNotification(ConsoleNotificationType::EventViewerRefresh, (void*)CpuType::Gameboy); GetEventManager(CpuType::Gameboy)->ClearFrameEvents(); break; + + case EventType::GbEndFrame: + if(_settings->CheckFlag(EmulationFlags::GameboyMode)) { + _scriptManager->ProcessEvent(EventType::EndFrame); + } + break; case EventType::Reset: Reset();