summaryrefslogtreecommitdiffstats
path: root/src/core/tools/freezer.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-12-23 19:58:09 +0100
committerLiam <byteslice@airmail.cc>2023-12-23 21:36:44 +0100
commitf34d3d7e84a1396d4d4f07ec1434b06b1f39bb8a (patch)
treee04a08b7ecf57be7aa7a9d2801f09eddd5d19018 /src/core/tools/freezer.cpp
parentMerge pull request #12412 from ameerj/gl-query-prims (diff)
downloadyuzu-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/freezer.cpp')
-rw-r--r--src/core/tools/freezer.cpp17
1 files changed, 8 insertions, 9 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;