mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-27 22:37:08 +00:00
PlayReport: Add Sparse Multi Value formatters
This commit is contained in:
parent
aa8ba8b503
commit
2c8edaf89e
6 changed files with 343 additions and 244 deletions
|
|
@ -126,14 +126,16 @@ namespace Ryujinx.Ava
|
|||
if (!TitleIDs.CurrentApplication.Value.HasValue) return;
|
||||
if (_discordPresencePlaying is null) return;
|
||||
|
||||
Analyzer.FormattedValue formattedValue =
|
||||
FormattedValue formattedValue =
|
||||
PlayReports.Analyzer.Format(TitleIDs.CurrentApplication.Value, _currentApp, playReport);
|
||||
|
||||
if (!formattedValue.Handled) return;
|
||||
|
||||
_discordPresencePlaying.Details = formattedValue.Reset
|
||||
? $"Playing {_currentApp.Title}"
|
||||
: formattedValue.FormattedString;
|
||||
_discordPresencePlaying.Details = TruncateToByteLength(
|
||||
formattedValue.Reset
|
||||
? $"Playing {_currentApp.Title}"
|
||||
: formattedValue.FormattedString
|
||||
);
|
||||
|
||||
if (_discordClient.CurrentPresence.Details.Equals(_discordPresencePlaying.Details))
|
||||
return; //don't trigger an update if the set presence Details are identical to current
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue