mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
Updated GetGameDisplayName to use rc_client
This commit is contained in:
parent
486a9d2318
commit
7b835a20ca
@ -398,7 +398,7 @@ void AchievementManager::FetchBadges()
|
||||
|
||||
void AchievementManager::DoFrame()
|
||||
{
|
||||
if (!m_is_game_loaded || !Core::IsCPUThread())
|
||||
if (!IsGameLoaded() || !Core::IsCPUThread())
|
||||
return;
|
||||
if (m_framecount == 0x200)
|
||||
{
|
||||
@ -532,9 +532,9 @@ const AchievementManager::BadgeStatus& AchievementManager::GetPlayerBadge() cons
|
||||
return m_player_badge;
|
||||
}
|
||||
|
||||
std::string AchievementManager::GetGameDisplayName() const
|
||||
std::string_view AchievementManager::GetGameDisplayName() const
|
||||
{
|
||||
return IsGameLoaded() ? m_game_data.title : "";
|
||||
return IsGameLoaded() ? std::string_view(rc_client_get_game_info(m_client)->title) : "";
|
||||
}
|
||||
|
||||
AchievementManager::PointSpread AchievementManager::TallyScore() const
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
std::string_view GetPlayerDisplayName() const;
|
||||
u32 GetPlayerScore() const;
|
||||
const BadgeStatus& GetPlayerBadge() const;
|
||||
std::string GetGameDisplayName() const;
|
||||
std::string_view GetGameDisplayName() const;
|
||||
PointSpread TallyScore() const;
|
||||
rc_api_fetch_game_data_response_t* GetGameData();
|
||||
const BadgeStatus& GetGameBadge() const;
|
||||
|
@ -78,7 +78,7 @@ void AchievementHeaderWidget::UpdateData()
|
||||
|
||||
AchievementManager::PointSpread point_spread = instance.TallyScore();
|
||||
QString user_name = QtUtils::FromStdString(instance.GetPlayerDisplayName());
|
||||
QString game_name = QString::fromStdString(instance.GetGameDisplayName());
|
||||
QString game_name = QtUtils::FromStdString(instance.GetGameDisplayName());
|
||||
AchievementManager::BadgeStatus player_badge = instance.GetPlayerBadge();
|
||||
AchievementManager::BadgeStatus game_badge = instance.GetGameBadge();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user