mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Fix lifecycle-notification assert problem (was called from wrong thread)
This commit is contained in:
1 parent
f6050a442c
commit
a107d75e38
2 files changed
+5
-2
No files matched your search
@@ -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
@@ -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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user