From 46e576a402a4d4cc6441bb43c9b2ce7b8c3b4eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 12 Oct 2026 14:33:00 +0200 Subject: [PATCH] Attach the NPDRM ISO dump thread to JNI It does file I/O, which goes through Java for a content URI memstick, and getEnv() asserts on an unattached thread. Co-Authored-By: Claude Opus 5.5 --- Core/PSPLoaders.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index 091bdcc95f..49d2de3d6e 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -18,6 +18,7 @@ #include #include "Core/Core.h" +#include "Common/Thread/ThreadUtil.h" #include "Common/System/Request.h" #include "Common/File/AndroidContentURI.h" @@ -69,6 +70,8 @@ void DumpBlockDeviceAsync(std::shared_ptr bd, Path destPath, std::s if (npdrmDemoBD) { INFO_LOG(Log::System, "Dumping NPDRM demo ISO... (%s)", destPath.c_str()); std::thread dumpThread([bd, title, destPath]() { + SetCurrentThreadName("DumpBlockDevice"); + AndroidJNIThreadContext jniContext; // destPath can be a content URI. File::CreateFullPath(destPath.NavigateUp()); if (File::Exists(destPath)) { INFO_LOG(Log::System, "Dump file already exists, skipping: %s", destPath.c_str());