diff options
author | Kelebek1 <[email protected]> | 2022-07-10 06:59:40 +0100 |
---|---|---|
committer | Kelebek1 <[email protected]> | 2022-07-10 06:59:40 +0100 |
commit | 240650f6a6336df8d3eb11b410cdcd332d8ad562 (patch) | |
tree | 16ae249e6160a22f88bd2238d43b23079c4afb44 /src/core/memory | |
parent | c765d5be0bf77af65b254db09997d47a9bddd46e (diff) | |
download | yuzu-mainline-240650f6a6336df8d3eb11b410cdcd332d8ad562.tar.gz yuzu-mainline-240650f6a6336df8d3eb11b410cdcd332d8ad562.zip |
Rework CoreTiming
Diffstat (limited to 'src/core/memory')
-rw-r--r-- | src/core/memory/cheat_engine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index 5f71f0ff5..09a02d2ac 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -184,10 +184,12 @@ CheatEngine::~CheatEngine() { void CheatEngine::Initialize() { event = Core::Timing::CreateEvent( "CheatEngine::FrameCallback::" + Common::HexToString(metadata.main_nso_build_id), - [this](std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { + [this](std::uintptr_t user_data, s64 time, + std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { FrameCallback(user_data, ns_late); + return std::nullopt; }); - core_timing.ScheduleEvent(CHEAT_ENGINE_NS, event); + core_timing.ScheduleLoopingEvent(std::chrono::nanoseconds(0), CHEAT_ENGINE_NS, event); metadata.process_id = system.CurrentProcess()->GetProcessID(); metadata.title_id = system.GetCurrentProcessProgramID(); @@ -237,8 +239,6 @@ void CheatEngine::FrameCallback(std::uintptr_t, std::chrono::nanoseconds ns_late MICROPROFILE_SCOPE(Cheat_Engine); vm.Execute(metadata); - - core_timing.ScheduleEvent(CHEAT_ENGINE_NS - ns_late, event); } } // namespace Core::Memory |