From 3f5bc3464d5e19cc98c15d132e524db388b68c77 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 5 Jun 2023 23:54:53 +0200 Subject: [PATCH] Rename ProcureCurrentEmulationCourseInformation to GetEmulationIdentifier This is much easier to understand in my opinion. The old name just made me scratch my head whenever I read it. --- rpcs3/Emu/System.cpp | 4 ++-- rpcs3/Emu/System.h | 3 ++- rpcs3/rpcs3qt/debugger_frame.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 7b09fd8a18..1e4601edef 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -2204,7 +2204,7 @@ void Emulator::FinalizeRunRequest() if (m_savestate_extension_flags1 & SaveStateExtentionFlags1::ShouldCloseMenu) { - std::thread([this, info = ProcureCurrentEmulationCourseInformation()]() + std::thread([this, info = GetEmulationIdentifier()]() { std::this_thread::sleep_for(2s); @@ -2451,7 +2451,7 @@ void Emulator::GracefulShutdown(bool allow_autoexit, bool async_op, bool savesta return; } - auto perform_kill = [read_counter, allow_autoexit, this, info = ProcureCurrentEmulationCourseInformation()]() + auto perform_kill = [read_counter, allow_autoexit, this, info = GetEmulationIdentifier()]() { bool read_sysutil_signal = false; diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 86f262c94e..ff7744bcd3 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -189,7 +189,8 @@ public: enum class stop_counter_t : u64{}; - stop_counter_t ProcureCurrentEmulationCourseInformation() const + // Returns a different value each time we start a new emulation. + stop_counter_t GetEmulationIdentifier() const { return stop_counter_t{+m_stop_ctr}; } diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index 8e9923cdcf..29b04ee5af 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -805,9 +805,9 @@ std::function debugger_frame::make_check_cpu(cpu_thread* cpu, boo shared.reset(); } - return [cpu, type, shared = std::move(shared), emu_course = Emu.ProcureCurrentEmulationCourseInformation()]() -> cpu_thread* + return [cpu, type, shared = std::move(shared), emulation_id = Emu.GetEmulationIdentifier()]() -> cpu_thread* { - if (emu_course != Emu.ProcureCurrentEmulationCourseInformation()) + if (emulation_id != Emu.GetEmulationIdentifier()) { // Invalidate all data after Emu.Kill() return nullptr;