From 325e219bb14786d9ab6fe4d6eb268e146fdd0e7b Mon Sep 17 00:00:00 2001 From: GovanifY Date: Thu, 25 Jan 2024 09:37:15 +0100 Subject: [PATCH] PINE: fix save state regression introduced during the switch to Qt Ensure thread safety when loading/saving state --- pcsx2/PINE.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcsx2/PINE.cpp b/pcsx2/PINE.cpp index 9dde9a5572376..e455dc5dcd870 100644 --- a/pcsx2/PINE.cpp +++ b/pcsx2/PINE.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LGPL-3.0+ #include "Common.h" +#include "Host.h" #include "Memory.h" #include "Elfheader.h" #include "PINE.h" @@ -623,7 +624,7 @@ PINEServer::IPCBuffer PINEServer::ParseCommand(std::span buf, std::vector(buf, buf_cnt)); + Host::RunOnCPUThread([slot = FromSpan(buf, buf_cnt)] { VMManager::SaveStateToSlot(slot); }); buf_cnt += 1; break; } @@ -633,7 +634,7 @@ PINEServer::IPCBuffer PINEServer::ParseCommand(std::span buf, std::vector(buf, buf_cnt)); + Host::RunOnCPUThread([slot = FromSpan(buf, buf_cnt)] { VMManager::LoadStateFromSlot(slot); }); buf_cnt += 1; break; }