Fix lifecycle-notification assert problem (was called from wrong thread)

This commit is contained in:
Henrik Rydgård committed 2025-08-24 11:17:19 +02:00
1 parent f6050a442c
commit a107d75e38
2 files changed
+5 -2

No files matched your search

+3
View File
@@ -26,6 +26,7 @@
#include "Common/Profiler/Profiler.h"
#include "Common/GraphicsContext.h"
#include "Common/Thread/ThreadUtil.h"
#include "Common/Log.h"
#include "Core/Core.h"
#include "Core/Config.h"
@@ -143,6 +144,8 @@ void Core_ListenLifecycle(CoreLifecycleFunc func) {
}
void Core_NotifyLifecycle(CoreLifecycle stage) {
AssertCurrentThreadName("EmuThread");
if (stage == CoreLifecycle::STARTING) {
Core_ResetException();
}
+2 -2
View File
@@ -585,6 +585,8 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
_assert_msg_(!g_loadingThread.joinable(), "%s", coreParam.fileToStart.c_str());
Core_NotifyLifecycle(CoreLifecycle::STARTING);
g_loadingThread = std::thread([error_string]() {
SetCurrentThreadName("ExecLoader");
@@ -592,8 +594,6 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
NOTICE_LOG(Log::Boot, "PPSSPP %s", PPSSPP_GIT_VERSION);
Core_NotifyLifecycle(CoreLifecycle::STARTING);
Path filename = g_CoreParameter.fileToStart;
FileLoader *loadedFile = ResolveFileLoaderTarget(ConstructFileLoader(filename));