diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-07-13 19:51:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-13 19:51:01 +0200 |
| commit | 014037ebb7897bd7051bdd9b76128fbc20db1674 (patch) | |
| tree | 2a47fb496d72d5c72413b6433afc4006fdc4aa02 /Source/Android/jni/MainAndroid.cpp | |
| parent | 89a03174ccfcc0dc80c9f59b84338f508919a555 (diff) | |
| parent | 0a15aaaa123482ecf7b2490a13e33a884416d51c (diff) | |
Merge pull request #3983 from JosJuice/discio-enums
Move DiscIO enums to a new file
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
| -rw-r--r-- | Source/Android/jni/MainAndroid.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 2ccc634874..7e3da54b25 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -33,6 +33,7 @@ #include "Core/PowerPC/Profiler.h" #include "Core/State.h" +#include "DiscIO/Enums.h" #include "DiscIO/Volume.h" #include "DiscIO/VolumeCreator.h" @@ -226,15 +227,14 @@ static int GetCountry(std::string filename) if (pVolume != nullptr) { - DiscIO::IVolume::ECountry country = pVolume->GetCountry(); + int country = static_cast<int>(pVolume->GetCountry()); __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Country Code: %i", country); return country; } - // Return UNKNOWN - return 13; + return static_cast<int>(DiscIO::Country::COUNTRY_UNKNOWN); } static int GetPlatform(std::string filename) @@ -245,13 +245,13 @@ static int GetPlatform(std::string filename) { switch (pVolume->GetVolumeType()) { - case DiscIO::IVolume::GAMECUBE_DISC: + case DiscIO::Platform::GAMECUBE_DISC: __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Volume is a GameCube disc."); return 0; - case DiscIO::IVolume::WII_DISC: + case DiscIO::Platform::WII_DISC: __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Volume is a Wii disc."); return 1; - case DiscIO::IVolume::WII_WAD: + case DiscIO::Platform::WII_WAD: __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Volume is a Wii WAD."); return 2; } @@ -269,13 +269,13 @@ static std::string GetTitle(std::string filename) if (pVolume != nullptr) { - std::map<DiscIO::IVolume::ELanguage, std::string> titles = pVolume->GetLongNames(); + std::map<DiscIO::Language, 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::Platform::GAMECUBE_DISC; + DiscIO::Language language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title); auto it = titles.find(language); if (it != end) @@ -284,8 +284,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 - // if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) { - auto it = titles.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH); + // if (language != DiscIO::Language::LANGUAGE_ENGLISH) { + auto it = titles.find(DiscIO::Language::LANGUAGE_ENGLISH); if (it != end) return it->second; //} @@ -312,11 +312,11 @@ static std::string GetDescription(std::string filename) if (volume != nullptr) { - std::map<DiscIO::IVolume::ELanguage, std::string> descriptions = volume->GetDescriptions(); + std::map<DiscIO::Language, 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::Platform::GAMECUBE_DISC; + DiscIO::Language language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title); auto it = descriptions.find(language); if (it != end) @@ -325,8 +325,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 - // if (language != DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH) { - auto it = descriptions.find(DiscIO::IVolume::ELanguage::LANGUAGE_ENGLISH); + // if (language != DiscIO::Language::LANGUAGE_ENGLISH) { + auto it = descriptions.find(DiscIO::Language::LANGUAGE_ENGLISH); if (it != end) return it->second; //} |
