Exclude time spent with emulator paused from play time

With this change, the play time reported internally by a game's gameplay
timer should match (or be much closer to matching) what Ryujinx displays
in the application library.

Aside from this being closer to the natural expectation of what "hours
played" would take into account (as by definition time spent paused is
time spent not playing), this also brings us closer to the behavior of
other emulators and game libraries.
This commit is contained in:
Mahmoud Al-Qudsi 2025-06-10 13:49:18 -05:00 committed by GreemDev
parent 6bb2af0091
commit 84758d0ddc
3 changed files with 13 additions and 5 deletions

View file

@ -1688,8 +1688,8 @@ namespace Ryujinx.Ava.UI.ViewModels
RendererHostControl.Focus();
});
public static void UpdateGameMetadata(string titleId)
=> ApplicationLibrary.LoadAndSaveMetaData(titleId, appMetadata => appMetadata.UpdatePostGame());
public static void UpdateGameMetadata(string titleId, TimeSpan pauseTime)
=> ApplicationLibrary.LoadAndSaveMetaData(titleId, appMetadata => appMetadata.UpdatePostGame(pauseTime));
public void RefreshFirmwareStatus()
{