mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
Android: Don't show game ID after game title
This commit is contained in:
parent
0dc29c743b
commit
3a0917371e
@ -780,7 +780,12 @@ JNIEXPORT jstring JNICALL
|
|||||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCurrentTitleDescriptionUnchecked(JNIEnv* env,
|
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCurrentTitleDescriptionUnchecked(JNIEnv* env,
|
||||||
jobject obj)
|
jobject obj)
|
||||||
{
|
{
|
||||||
return ToJString(env, SConfig::GetInstance().GetTitleDescription());
|
// Prefer showing just the name. If no name is available, show just the game ID.
|
||||||
|
std::string description = SConfig::GetInstance().GetTitleName();
|
||||||
|
if (description.empty())
|
||||||
|
description = SConfig::GetInstance().GetTitleDescription();
|
||||||
|
|
||||||
|
return ToJString(env, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -681,12 +681,14 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, const std::stri
|
|||||||
|
|
||||||
if (game_id == "00000000")
|
if (game_id == "00000000")
|
||||||
{
|
{
|
||||||
|
m_title_name.clear();
|
||||||
m_title_description.clear();
|
m_title_description.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Core::TitleDatabase title_database;
|
const Core::TitleDatabase title_database;
|
||||||
const DiscIO::Language language = GetLanguageAdjustedForRegion(bWii, region);
|
const DiscIO::Language language = GetLanguageAdjustedForRegion(bWii, region);
|
||||||
|
m_title_name = title_database.GetTitleName(m_gametdb_id, language);
|
||||||
m_title_description = title_database.Describe(m_gametdb_id, language);
|
m_title_description = title_database.Describe(m_gametdb_id, language);
|
||||||
NOTICE_LOG(CORE, "Active title: %s", m_title_description.c_str());
|
NOTICE_LOG(CORE, "Active title: %s", m_title_description.c_str());
|
||||||
Host_TitleChanged();
|
Host_TitleChanged();
|
||||||
|
@ -188,6 +188,7 @@ struct SConfig
|
|||||||
bool m_disc_booted_from_game_list = false;
|
bool m_disc_booted_from_game_list = false;
|
||||||
|
|
||||||
const std::string& GetGameID() const { return m_game_id; }
|
const std::string& GetGameID() const { return m_game_id; }
|
||||||
|
const std::string& GetTitleName() const { return m_title_name; }
|
||||||
const std::string& GetTitleDescription() const { return m_title_description; }
|
const std::string& GetTitleDescription() const { return m_title_description; }
|
||||||
u64 GetTitleID() const { return m_title_id; }
|
u64 GetTitleID() const { return m_title_id; }
|
||||||
u16 GetRevision() const { return m_revision; }
|
u16 GetRevision() const { return m_revision; }
|
||||||
@ -360,6 +361,7 @@ private:
|
|||||||
|
|
||||||
std::string m_game_id;
|
std::string m_game_id;
|
||||||
std::string m_gametdb_id;
|
std::string m_gametdb_id;
|
||||||
|
std::string m_title_name;
|
||||||
std::string m_title_description;
|
std::string m_title_description;
|
||||||
u64 m_title_id;
|
u64 m_title_id;
|
||||||
u16 m_revision;
|
u16 m_revision;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user