summaryrefslogtreecommitdiff
path: root/Source/Android/jni/MainAndroid.cpp
diff options
context:
space:
mode:
authorRukai <rubickent@gmail.com>2016-02-29 19:52:15 +1100
committerRukai <rubickent@gmail.com>2016-06-26 00:03:59 +1000
commitb5104a79f1d39d2d7d160f2bd984f604a5ae2797 (patch)
treeac679b6a20266551a906b18f42729c7edd661a80 /Source/Android/jni/MainAndroid.cpp
parentafa202738e54652e98e8388a5c6a1541d750e3e6 (diff)
GCVolume: supports reading all opening.bnr information
DQT2: Game properties dialog contains info tab giving information about the selected iso.
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
-rw-r--r--Source/Android/jni/MainAndroid.cpp28
1 files changed, 19 insertions, 9 deletions
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<DiscIO::IVolume::ELanguage, std::string> titles = pVolume->GetNames(true);
+ std::map<DiscIO::IVolume::ELanguage, std::string> 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<DiscIO::IVolume::ELanguage, std::string> 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);