From dd514a115ccdf44662868dbd4bc7b02254c1fe9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Arrouye?= <5017270+tarrouye@users.noreply.github.com> Date: Sun, 28 May 2023 14:03:27 -0700 Subject: [PATCH] Update LastPlayed date on emulation end. (#5056) --- src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs | 2 ++ src/Ryujinx/Ui/MainWindow.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs index f8dd41435..e7013968d 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs @@ -1529,6 +1529,8 @@ namespace Ryujinx.Ava.UI.ViewModels double sessionTimePlayed = DateTime.UtcNow.Subtract(appMetadata.LastPlayed.Value).TotalSeconds; appMetadata.TimePlayed += Math.Round(sessionTimePlayed, MidpointRounding.AwayFromZero); } + + appMetadata.LastPlayed = DateTime.UtcNow; }); } diff --git a/src/Ryujinx/Ui/MainWindow.cs b/src/Ryujinx/Ui/MainWindow.cs index 7cae62227..1918594ce 100644 --- a/src/Ryujinx/Ui/MainWindow.cs +++ b/src/Ryujinx/Ui/MainWindow.cs @@ -1024,6 +1024,8 @@ namespace Ryujinx.Ui double sessionTimePlayed = DateTime.UtcNow.Subtract(appMetadata.LastPlayed.Value).TotalSeconds; appMetadata.TimePlayed += Math.Round(sessionTimePlayed, MidpointRounding.AwayFromZero); } + + appMetadata.LastPlayed = DateTime.UtcNow; }); } }