From 757d8728b72a64c7b937481015a4eb20b2c9475f Mon Sep 17 00:00:00 2001 From: omegadox Date: Fri, 20 Feb 2009 23:42:21 +0000 Subject: [PATCH] Only apply patches in the SI Callback git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2327 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Core.cpp | 5 ----- Source/Core/Core/Src/HW/SystemTimers.cpp | 10 +++++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index dee43a30d5..4bc78582b2 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -36,7 +36,6 @@ #include "CPUDetect.h" #include "CoreTiming.h" #include "Boot/Boot.h" -#include "PatchEngine.h" #include "HW/Memmap.h" #include "HW/PeripheralInterface.h" @@ -628,10 +627,6 @@ void Callback_VideoCopiedToXFB() frames = 0; Timer.Update(); } - - // TODO: hm, are these really safe to call from the video thread? - PatchEngine::ApplyFramePatches(); - PatchEngine::ApplyARPatches(); } // __________________________________________________________________________________________________ diff --git a/Source/Core/Core/Src/HW/SystemTimers.cpp b/Source/Core/Core/Src/HW/SystemTimers.cpp index da9e182f75..ab20fa9389 100644 --- a/Source/Core/Core/Src/HW/SystemTimers.cpp +++ b/Source/Core/Core/Src/HW/SystemTimers.cpp @@ -185,13 +185,13 @@ void VICallback(u64 userdata, int cyclesLate) void SICallback(u64 userdata, int cyclesLate) { - // This is once per frame - good candidate for patching stuff - PatchEngine::ApplyFramePatches(); - // Apply AR cheats - PatchEngine::ApplyARPatches(); - // OK, do what we are here to do. SerialInterface::UpdateDevices(); CoreTiming::ScheduleEvent(SI_PERIOD-cyclesLate, et_SI); + + // This is once per frame - good candidate for patching stuff + // Patch mem and run the Action Replay + PatchEngine::ApplyFramePatches(); + PatchEngine::ApplyARPatches(); } void DecrementerCallback(u64 userdata, int cyclesLate)