mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 15:59:23 +01:00
UICommon: Remove Android hacks from GameFile
This commit is contained in:
parent
c677268aaf
commit
f79ca65170
@ -46,28 +46,11 @@ namespace
|
|||||||
constexpr char COVER_URL[] = "https://art.gametdb.com/wii/cover/%s/%s.png";
|
constexpr char COVER_URL[] = "https://art.gametdb.com/wii/cover/%s/%s.png";
|
||||||
|
|
||||||
const std::string EMPTY_STRING;
|
const std::string EMPTY_STRING;
|
||||||
|
|
||||||
bool UseGameCovers()
|
|
||||||
{
|
|
||||||
// We ifdef this out on Android because accessing the config before emulation start makes us crash.
|
|
||||||
// The Android GUI handles covers in Java anyway, so this doesn't make us lose any functionality.
|
|
||||||
#ifdef ANDROID
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
return Config::Get(Config::MAIN_USE_GAME_COVERS);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
DiscIO::Language GameFile::GetConfigLanguage() const
|
DiscIO::Language GameFile::GetConfigLanguage() const
|
||||||
{
|
{
|
||||||
#ifdef ANDROID
|
|
||||||
// TODO: Make the Android app load the config at app start instead of emulation start
|
|
||||||
// so that we can access the user's preference here
|
|
||||||
return DiscIO::Language::English;
|
|
||||||
#else
|
|
||||||
return SConfig::GetInstance().GetLanguageAdjustedForRegion(DiscIO::IsWii(m_platform), m_region);
|
return SConfig::GetInstance().GetLanguageAdjustedForRegion(DiscIO::IsWii(m_platform), m_region);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const GameBanner& lhs, const GameBanner& rhs)
|
bool operator==(const GameBanner& lhs, const GameBanner& rhs)
|
||||||
@ -174,7 +157,7 @@ bool GameFile::IsValid() const
|
|||||||
|
|
||||||
bool GameFile::CustomCoverChanged()
|
bool GameFile::CustomCoverChanged()
|
||||||
{
|
{
|
||||||
if (!m_custom_cover.buffer.empty() || !UseGameCovers())
|
if (!m_custom_cover.buffer.empty() || !Config::Get(Config::MAIN_USE_GAME_COVERS))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::string path, name;
|
std::string path, name;
|
||||||
@ -201,7 +184,7 @@ bool GameFile::CustomCoverChanged()
|
|||||||
|
|
||||||
void GameFile::DownloadDefaultCover()
|
void GameFile::DownloadDefaultCover()
|
||||||
{
|
{
|
||||||
if (!m_default_cover.buffer.empty() || !UseGameCovers())
|
if (!m_default_cover.buffer.empty() || !Config::Get(Config::MAIN_USE_GAME_COVERS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto cover_path = File::GetUserPath(D_COVERCACHE_IDX) + DIR_SEP;
|
const auto cover_path = File::GetUserPath(D_COVERCACHE_IDX) + DIR_SEP;
|
||||||
@ -267,7 +250,7 @@ void GameFile::DownloadDefaultCover()
|
|||||||
|
|
||||||
bool GameFile::DefaultCoverChanged()
|
bool GameFile::DefaultCoverChanged()
|
||||||
{
|
{
|
||||||
if (!m_default_cover.buffer.empty() || !UseGameCovers())
|
if (!m_default_cover.buffer.empty() || !Config::Get(Config::MAIN_USE_GAME_COVERS))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const auto cover_path = File::GetUserPath(D_COVERCACHE_IDX) + DIR_SEP;
|
const auto cover_path = File::GetUserPath(D_COVERCACHE_IDX) + DIR_SEP;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user