diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-01-01 20:56:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-01 20:56:31 +0100 |
commit | aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c (patch) | |
tree | 3f7ca8e93b7bc523b8dd357ec43d302fd794b37c /src/core/memory | |
parent | Merge pull request #12466 from liamwhite/sh2 (diff) | |
parent | core_timing: block advance thread while clearing and signal after (diff) | |
download | yuzu-aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c.tar yuzu-aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c.tar.gz yuzu-aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c.tar.bz2 yuzu-aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c.tar.lz yuzu-aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c.tar.xz yuzu-aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c.tar.zst yuzu-aa9ff2ffc2d9c3c1b7d6f4f6a7170acda7e17e9c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/memory/cheat_engine.cpp | 8 | ||||
-rw-r--r-- | src/core/memory/cheat_engine.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index 3fc4024dc..7bc5b5ae5 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -190,15 +190,15 @@ CheatEngine::CheatEngine(System& system_, std::vector<CheatEntry> cheats_, } CheatEngine::~CheatEngine() { - core_timing.UnscheduleEvent(event, 0); + core_timing.UnscheduleEvent(event); } void CheatEngine::Initialize() { event = Core::Timing::CreateEvent( "CheatEngine::FrameCallback::" + Common::HexToString(metadata.main_nso_build_id), - [this](std::uintptr_t user_data, s64 time, + [this](s64 time, std::chrono::nanoseconds ns_late) -> std::optional<std::chrono::nanoseconds> { - FrameCallback(user_data, ns_late); + FrameCallback(ns_late); return std::nullopt; }); core_timing.ScheduleLoopingEvent(CHEAT_ENGINE_NS, CHEAT_ENGINE_NS, event); @@ -239,7 +239,7 @@ void CheatEngine::Reload(std::vector<CheatEntry> reload_cheats) { MICROPROFILE_DEFINE(Cheat_Engine, "Add-Ons", "Cheat Engine", MP_RGB(70, 200, 70)); -void CheatEngine::FrameCallback(std::uintptr_t, std::chrono::nanoseconds ns_late) { +void CheatEngine::FrameCallback(std::chrono::nanoseconds ns_late) { if (is_pending_reload.exchange(false)) { vm.LoadProgram(cheats); } diff --git a/src/core/memory/cheat_engine.h b/src/core/memory/cheat_engine.h index 284abdd28..ced2168d1 100644 --- a/src/core/memory/cheat_engine.h +++ b/src/core/memory/cheat_engine.h @@ -70,7 +70,7 @@ public: void Reload(std::vector<CheatEntry> reload_cheats); private: - void FrameCallback(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); + void FrameCallback(std::chrono::nanoseconds ns_late); DmntCheatVm vm; CheatProcessMetadata metadata; |