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.
This commit is contained in:
Megamouse 2023-06-05 23:54:53 +02:00
parent fcd6be71b0
commit 3f5bc3464d
3 changed files with 6 additions and 5 deletions

View File

@ -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;

View File

@ -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};
}

View File

@ -805,9 +805,9 @@ std::function<cpu_thread*()> 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;