mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-05 20:09:15 +00:00
Use localized game name to display on the compatibility window if the game is owned.
This commit is contained in:
@@ -47,10 +47,19 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
private void AppCountUpdated(object _, ApplicationCountUpdatedEventArgs __)
|
||||
=> _ownedGameTitleIds = _appLibrary.Applications.Keys.Select(x => x.ToString("X16")).ToArray();
|
||||
|
||||
private void LocalizeGameNames()
|
||||
{
|
||||
foreach (var entry in CompatibilityDatabase.Entries)
|
||||
{
|
||||
entry.GameName = _appLibrary.Applications.Items.SingleOrDefault(x => string.Equals(x.IdString, entry.TitleId, StringComparison.OrdinalIgnoreCase))?.Name ?? entry.GameName;
|
||||
}
|
||||
}
|
||||
|
||||
public CompatibilityViewModel(ApplicationLibrary appLibrary)
|
||||
{
|
||||
_appLibrary = appLibrary;
|
||||
AppCountUpdated(null, null);
|
||||
LocalizeGameNames();
|
||||
CountByStatus();
|
||||
_appLibrary.ApplicationCountUpdated += AppCountUpdated;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user