From b5104a79f1d39d2d7d160f2bd984f604a5ae2797 Mon Sep 17 00:00:00 2001 From: Rukai Date: Mon, 29 Feb 2016 19:52:15 +1100 Subject: GCVolume: supports reading all opening.bnr information DQT2: Game properties dialog contains info tab giving information about the selected iso. --- Source/Android/jni/MainAndroid.cpp | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'Source/Android') diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 796a2b5409..4dab66a701 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -269,11 +269,15 @@ static std::string GetTitle(std::string filename) if (pVolume != nullptr) { - std::map titles = pVolume->GetNames(true); + std::map titles = pVolume->GetLongNames(); + if (titles.empty()) + titles = pVolume->GetShortNames(); /* - bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC; - DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title); + bool is_wii_title = pVolume->GetVolumeType() != + DiscIO::IVolume::GAMECUBE_DISC; + DiscIO::IVolume::ELanguage language = + SConfig::GetInstance().GetCurrentLanguage(is_wii_title); auto it = titles.find(language); if (it != end) @@ -281,7 +285,8 @@ static std::string GetTitle(std::string filename) auto end = titles.end(); - // English tends to be a good fallback when the requested language isn't available + // English tends to be a good fallback when the requested language isn't + // available // if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) { auto it = titles.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH); if (it != end) @@ -313,8 +318,10 @@ static std::string GetDescription(std::string filename) std::map descriptions = volume->GetDescriptions(); /* - bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC; - DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title); + bool is_wii_title = pVolume->GetVolumeType() != + DiscIO::IVolume::GAMECUBE_DISC; + DiscIO::IVolume::ELanguage language = + SConfig::GetInstance().GetCurrentLanguage(is_wii_title); auto it = descriptions.find(language); if (it != end) @@ -322,7 +329,8 @@ static std::string GetDescription(std::string filename) auto end = descriptions.end(); - // English tends to be a good fallback when the requested language isn't available + // English tends to be a good fallback when the requested language isn't + // available // if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) { auto it = descriptions.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH); if (it != end) @@ -745,7 +753,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceChang if (surf == nullptr) __android_log_print(ANDROID_LOG_ERROR, DOLPHIN_TAG, "Error: Surface is null."); - // If GLInterface isn't a thing yet then we don't need to let it know that the surface has changed + // If GLInterface isn't a thing yet then we don't need to let it know that the + // surface has changed if (GLInterface) { GLInterface->UpdateHandle(surf); @@ -764,7 +773,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SurfaceDestr surf = nullptr; } - // If GLInterface isn't a thing yet then we don't need to let it know that the surface has changed + // If GLInterface isn't a thing yet then we don't need to let it know that the + // surface has changed if (GLInterface) { GLInterface->UpdateHandle(nullptr); -- cgit v1.2.3