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 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-12 14:33:00 +02:00
1 parent 54b83bf850
commit 46e576a402
1 file changed
+3
+3
View File
@@ -18,6 +18,7 @@
#include <thread>
#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<BlockDevice> 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());