diff options
| author | JosJuice <josjuice@gmail.com> | 2026-11-04 19:46:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-04 19:46:41 +0100 |
| commit | 584366cb6859f5e371b1314bf0d92bb59d4d1b80 (patch) | |
| tree | eacc9d6f545183321717955ed5c4f0589d125564 /Source/Android/jni/GameList/GameFile.cpp | |
| parent | 112e1a436ae8c81ccd6d002460094172e72a600f (diff) | |
| parent | 49ebb1cfea589e66134039d4ecca911e0e14af43 (diff) | |
Merge pull request #14794 from JosJuice/android-title-database
Android: Use TitleDatabase for game list
Diffstat (limited to 'Source/Android/jni/GameList/GameFile.cpp')
| -rw-r--r-- | Source/Android/jni/GameList/GameFile.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/Android/jni/GameList/GameFile.cpp b/Source/Android/jni/GameList/GameFile.cpp index dc922d701c..e13f5c810a 100644 --- a/Source/Android/jni/GameList/GameFile.cpp +++ b/Source/Android/jni/GameList/GameFile.cpp @@ -16,6 +16,7 @@ #include "UICommon/GameFile.h" #include "jni/AndroidCommon/AndroidCommon.h" #include "jni/AndroidCommon/IDCache.h" +#include "jni/GameList/TitleDatabase.h" static std::shared_ptr<const UICommon::GameFile>* GetPointer(JNIEnv* env, jobject obj) { @@ -52,11 +53,19 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getPlatform return static_cast<jint>(GetRef(env, obj)->GetPlatform()); } -JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getTitle(JNIEnv* env, - jobject obj) +JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getTitle( + JNIEnv* env, jobject obj, jobject j_title_database) { - return ToJString(env, - GetRef(env, obj)->GetName(UICommon::GameFile::Variant::LongAndPossiblyCustom)); + const Core::TitleDatabase* title_database = TitleDatabaseFromJava(env, j_title_database); + if (title_database) + { + return ToJString(env, GetRef(env, obj)->GetName(*title_database)); + } + else + { + return ToJString(env, + GetRef(env, obj)->GetName(UICommon::GameFile::Variant::LongAndPossiblyCustom)); + } } JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getDescription(JNIEnv* env, |
