Compare commits
4 Commits
Canary-1.2
...
2636444d46
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2636444d46 | ||
|
|
ea2287af03 | ||
|
|
8949f2aee0 | ||
|
|
98ea061b59 |
@@ -47,7 +47,8 @@ namespace Ryujinx.Common
|
||||
"01006f8002326000", // Animal Crossings: New Horizons
|
||||
"01009bf0072d4000", // Captain Toad: Treasure Tracker
|
||||
"01009510001ca000", // Fast RMX
|
||||
"01005CA01580E000", // Persona 5 Royale
|
||||
"01005CA01580E000", // Persona 5 Royal
|
||||
"0100b880154fc000", // Persona 5 The Royal (Japan)
|
||||
"010015100b514000", // Super Mario Bros. Wonder
|
||||
"0100000000010000", // Super Mario Odyssey
|
||||
|
||||
|
||||
@@ -132,18 +132,18 @@ namespace Ryujinx.Ava
|
||||
if (_discordPresencePlaying is null) return;
|
||||
if (!playReport.IsDictionary) return;
|
||||
|
||||
_playReportValues
|
||||
.FindFirst(x => x.Key.EqualsIgnoreCase(TitleIDs.CurrentApplication.Value))
|
||||
.Convert(x => x.Value)
|
||||
.IfPresent(x =>
|
||||
{
|
||||
if (!playReport.AsDictionary().TryGetValue(x.ReportKey, out MessagePackObject valuePackObject))
|
||||
return;
|
||||
foreach ((string titleId, (string reportKey, Func<object, string> formatter)) in _playReportValues)
|
||||
{
|
||||
if (!TitleIDs.CurrentApplication.Value.Value.EqualsIgnoreCase(titleId))
|
||||
continue;
|
||||
|
||||
if (!playReport.AsDictionary().TryGetValue(reportKey, out MessagePackObject valuePackObject))
|
||||
return;
|
||||
|
||||
_discordPresencePlaying.Details = x.Formatter(valuePackObject.ToObject());
|
||||
UpdatePlayingState();
|
||||
Logger.Info?.Print(LogClass.UI, "Updated Discord RPC based on a supported play report.");
|
||||
});
|
||||
_discordPresencePlaying.Details = formatter(valuePackObject.ToObject());
|
||||
UpdatePlayingState();
|
||||
Logger.Info?.Print(LogClass.UI, "Updated Discord RPC based on a supported play report.");
|
||||
}
|
||||
}
|
||||
|
||||
// title ID -> Play Report key & value formatter
|
||||
|
||||
Reference in New Issue
Block a user