mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 21:56:24 +02:00
UI: RPC: Maintain game started timestamp for the duration of the AppHost
This commit is contained in:
parent
250acab7a7
commit
e3f20abd23
4 changed files with 11 additions and 5 deletions
|
@ -14,7 +14,8 @@ namespace Ryujinx.Ava
|
|||
{
|
||||
public static class DiscordIntegrationModule
|
||||
{
|
||||
public static Timestamps StartedAt { get; set; }
|
||||
public static Timestamps EmulatorStartedAt { get; set; }
|
||||
public static Timestamps GuestAppStartedAt { get; set; }
|
||||
|
||||
private static string VersionString
|
||||
=> (ReleaseInformation.IsCanaryBuild ? "Canary " : string.Empty) + $"v{ReleaseInformation.Version}";
|
||||
|
@ -43,7 +44,7 @@ namespace Ryujinx.Ava
|
|||
},
|
||||
Details = "Main Menu",
|
||||
State = "Idling",
|
||||
Timestamps = StartedAt
|
||||
Timestamps = EmulatorStartedAt
|
||||
};
|
||||
|
||||
ConfigurationState.Instance.EnableDiscordIntegration.Event += Update;
|
||||
|
@ -100,7 +101,7 @@ namespace Ryujinx.Ava
|
|||
State = appMeta.LastPlayed.HasValue && appMeta.TimePlayed.TotalSeconds > 5
|
||||
? $"Total play time: {ValueFormatUtils.FormatTimeSpan(appMeta.TimePlayed)}"
|
||||
: "Never played",
|
||||
Timestamps = Timestamps.Now
|
||||
Timestamps = GuestAppStartedAt ??= Timestamps.Now
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue