diff options
author | Liam <byteslice@airmail.cc> | 2023-12-23 19:58:09 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-23 21:36:44 +0100 |
commit | f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a (patch) | |
tree | e04a08b7ecf57be7aa7a9d2801f09eddd5d19018 /src/core/tools | |
parent | Merge pull request #12412 from ameerj/gl-query-prims (diff) | |
download | yuzu-f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a.tar yuzu-f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a.tar.gz yuzu-f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a.tar.bz2 yuzu-f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a.tar.lz yuzu-f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a.tar.xz yuzu-f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a.tar.zst yuzu-f34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a.zip |
Diffstat (limited to 'src/core/tools')
-rw-r--r-- | src/core/tools/freezer.cpp | 17 | ||||
-rw-r--r-- | src/core/tools/freezer.h | 2 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/core/tools/freezer.cpp b/src/core/tools/freezer.cpp index 98ebbbf32..9d42c726e 100644 --- a/src/core/tools/freezer.cpp +++ b/src/core/tools/freezer.cpp @@ -51,18 +51,17 @@ void MemoryWriteWidth(Core::Memory::Memory& memory, u32 width, VAddr addr, u64 v Freezer::Freezer(Core::Timing::CoreTiming& core_timing_, Core::Memory::Memory& memory_) : core_timing{core_timing_}, memory{memory_} { - event = Core::Timing::CreateEvent( - "MemoryFreezer::FrameCallback", - [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; - }); + event = Core::Timing::CreateEvent("MemoryFreezer::FrameCallback", + [this](s64 time, std::chrono::nanoseconds ns_late) + -> std::optional<std::chrono::nanoseconds> { + FrameCallback(ns_late); + return std::nullopt; + }); core_timing.ScheduleEvent(memory_freezer_ns, event); } Freezer::~Freezer() { - core_timing.UnscheduleEvent(event, 0); + core_timing.UnscheduleEvent(event); } void Freezer::SetActive(bool is_active) { @@ -159,7 +158,7 @@ Freezer::Entries::const_iterator Freezer::FindEntry(VAddr address) const { [address](const Entry& entry) { return entry.address == address; }); } -void Freezer::FrameCallback(std::uintptr_t, std::chrono::nanoseconds ns_late) { +void Freezer::FrameCallback(std::chrono::nanoseconds ns_late) { if (!IsActive()) { LOG_DEBUG(Common_Memory, "Memory freezer has been deactivated, ending callback events."); return; diff --git a/src/core/tools/freezer.h b/src/core/tools/freezer.h index 0d6df5217..2efbc11f3 100644 --- a/src/core/tools/freezer.h +++ b/src/core/tools/freezer.h @@ -77,7 +77,7 @@ private: Entries::iterator FindEntry(VAddr address); Entries::const_iterator FindEntry(VAddr address) const; - void FrameCallback(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); + void FrameCallback(std::chrono::nanoseconds ns_late); void FillEntryReads(); std::atomic_bool active{false}; |