From 74b5e10dc553bb24ccb3460529b15b3c3198bb10 Mon Sep 17 00:00:00 2001 From: xbzk Date: Sun, 20 Sep 2026 22:56:06 +0200 Subject: [PATCH] [native] doesUpdateMatchProgram update mask fix (#4465) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Old silly bug i've been neglecting: On Android, installing content to NAND, under some content id conditions (ie MK8D DLC), base/update IDs mismatch, and UI prompts "The content that you selected does not match this game. Install anyway? Useless, yet fixed. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4465 Reviewed-by: lizzie Reviewed-by: MaranBr --- src/android/app/src/main/jni/native.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 746b00ad11..d4f7689934 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -788,7 +788,7 @@ int Java_org_yuzu_yuzu_1emu_NativeLibrary_installFileToNand(JNIEnv* env, jobject jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_doesUpdateMatchProgram(JNIEnv* env, jobject jobj, jstring jprogramId, jstring jupdatePath) { - u64 program_id = EmulationSession::GetProgramId(env, jprogramId); + const u64 program_id = FileSys::GetBaseTitleID(EmulationSession::GetProgramId(env, jprogramId)); std::string updatePath = Common::Android::GetJString(env, jupdatePath); std::shared_ptr nsp = std::make_shared( EmulationSession::GetInstance().System().GetFilesystem()->OpenFile( @@ -796,7 +796,7 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_doesUpdateMatchProgram(JNIEnv* en for (const auto& item : nsp->GetNCAs()) { for (const auto& nca_details : item.second) { if (nca_details.second->GetName().ends_with(".cnmt.nca")) { - auto update_id = nca_details.second->GetTitleId() & ~0xFFFULL; + const auto update_id = FileSys::GetBaseTitleID(nca_details.second->GetTitleId()); if (update_id == program_id) { return true; }