Compare commits

..

8 Commits

Author SHA1 Message Date
在中国的泰国青年_
de9551f5a3 Merge 05475de925 into ea2287af03 2025-02-02 15:16:02 -06:00
Evan Husted
ea2287af03 misc: chore: Rewrite play report checker to use a simple loop instead of Gommon Optionals
(I love how a class that's supposed to guard against null values entering your code still allows them thats so cool)
2025-02-02 13:17:31 -06:00
在中国的泰国青年_
05475de925 Merge branch 'Ryubing:master' into master 2025-02-02 10:23:42 +07:00
LotP1
6aa2b9f02c remove duplicate entries
you should not add entries to your language if they match the english entry
2025-02-01 17:41:18 +01:00
在中国的泰国青年_
d691da72b6 Update locales.json 2025-02-01 23:38:48 +07:00
在中国的泰国青年_
17e6815416 Update locales.json 2025-02-01 23:32:26 +07:00
在中国的泰国青年_
4e87e2708b Update locales.json 2025-02-01 20:11:48 +07:00
在中国的泰国青年_
911a63fc7b Update locales.json 2025-02-01 19:41:36 +07:00
2 changed files with 302 additions and 302 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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