mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 20:04:31 +01:00
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:
1 parent
54b83bf850
commit
46e576a402
1 file changed
+3
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user