diff --git a/Core/Core.cpp b/Core/Core.cpp index e7a256b281..e7112c24e6 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -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(); } diff --git a/Core/System.cpp b/Core/System.cpp index 627c4c686d..39292b3cc3 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -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));