Skip to content

Commit

Permalink
update rcheevos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Jan 13, 2024
1 parent 12cbec3 commit ffed42f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/data/context/GameContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,15 @@ void GameContext::EndLoadGame(int nResult, bool bWasPaused, bool bShowSoftcoreWa
}

// modified assets should start in the inactive state
size_t nLocalAssets = 0;
for (gsl::index nIndex = 0; nIndex < gsl::narrow_cast<gsl::index>(m_vAssets.Count()); ++nIndex)
{
auto* pAsset = m_vAssets.GetItemAt(nIndex);
if (pAsset != nullptr && pAsset->GetChanges() != ra::data::models::AssetChanges::None)
{
if (pAsset->HasUnpublishedChanges())
++nLocalAssets;

if (pAsset->IsActive())
{
if (pAsset->GetType() == ra::data::models::AssetType::RichPresence &&
Expand All @@ -302,6 +306,8 @@ void GameContext::EndLoadGame(int nResult, bool bWasPaused, bool bShowSoftcoreWa
}
}
}
if (nLocalAssets > 0)
RA_LOG_INFO("%d unpublished assets loaded", nLocalAssets);

// finish up
m_vAssets.EndUpdate();
Expand Down

0 comments on commit ffed42f

Please sign in to comment.