Compare commits
3 Commits
Canary-1.2
...
Canary-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de00a71690 | ||
|
|
315a1819c0 | ||
|
|
4ffb8aef12 |
@@ -1079,14 +1079,15 @@ namespace Ryujinx.UI.App.Common
|
||||
|
||||
private bool AddAndAutoSelectUpdate(TitleUpdateModel update)
|
||||
{
|
||||
if (update == null) return false;
|
||||
|
||||
var currentlySelected = TitleUpdates.Items.FindFirst(it =>
|
||||
it.TitleUpdate.TitleIdBase == update.TitleIdBase && it.IsSelected);
|
||||
|
||||
var shouldSelect = !currentlySelected.HasValue ||
|
||||
currentlySelected.Value.TitleUpdate.Version < update.Version;
|
||||
var shouldSelect = currentlySelected.Check(curr => curr.TitleUpdate?.Version < update.Version);
|
||||
|
||||
_titleUpdates.AddOrUpdate((update, shouldSelect));
|
||||
|
||||
|
||||
if (currentlySelected.HasValue && shouldSelect)
|
||||
{
|
||||
_titleUpdates.AddOrUpdate((currentlySelected.Value.TitleUpdate, false));
|
||||
@@ -1478,7 +1479,7 @@ namespace Ryujinx.UI.App.Common
|
||||
|
||||
if (TryGetTitleUpdatesFromFile(application.Path, out var bundledUpdates))
|
||||
{
|
||||
var savedUpdateLookup = savedUpdates.Select(update => update.Item1).ToHashSet();
|
||||
var savedUpdateLookup = savedUpdates.Select(update => update.Update).ToHashSet();
|
||||
bool updatesChanged = false;
|
||||
|
||||
foreach (var update in bundledUpdates.OrderByDescending(bundled => bundled.Version))
|
||||
@@ -1486,11 +1487,10 @@ namespace Ryujinx.UI.App.Common
|
||||
if (!savedUpdateLookup.Contains(update))
|
||||
{
|
||||
bool shouldSelect = false;
|
||||
if (!selectedUpdate.HasValue || selectedUpdate.Value.Item1.Version < update.Version)
|
||||
if (selectedUpdate.Check(su => su.Update?.Version < update.Version))
|
||||
{
|
||||
shouldSelect = true;
|
||||
if (selectedUpdate)
|
||||
_titleUpdates.AddOrUpdate((selectedUpdate.Value.Item1, false));
|
||||
_titleUpdates.AddOrUpdate((selectedUpdate.Value.Update, false));
|
||||
selectedUpdate = (update, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Ryujinx.UI.Common.Helper
|
||||
{
|
||||
private static readonly TitleUpdateMetadataJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions());
|
||||
|
||||
public static List<(TitleUpdateModel, bool IsSelected)> LoadTitleUpdatesJson(VirtualFileSystem vfs, ulong applicationIdBase)
|
||||
public static List<(TitleUpdateModel Update, bool IsSelected)> LoadTitleUpdatesJson(VirtualFileSystem vfs, ulong applicationIdBase)
|
||||
{
|
||||
var titleUpdatesJsonPath = PathToGameUpdatesJson(applicationIdBase);
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Ryujinx.UI.Common.Helper
|
||||
JsonHelper.SerializeToFile(titleUpdatesJsonPath, titleUpdateWindowData, _serializerContext.TitleUpdateMetadata);
|
||||
}
|
||||
|
||||
private static List<(TitleUpdateModel, bool IsSelected)> LoadTitleUpdates(VirtualFileSystem vfs, TitleUpdateMetadata titleUpdateMetadata, ulong applicationIdBase)
|
||||
private static List<(TitleUpdateModel Update, bool IsSelected)> LoadTitleUpdates(VirtualFileSystem vfs, TitleUpdateMetadata titleUpdateMetadata, ulong applicationIdBase)
|
||||
{
|
||||
var result = new List<(TitleUpdateModel, bool IsSelected)>();
|
||||
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "الغش متوفر لـ {0} [{1}]",
|
||||
"BuildId": "معرف البناء:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowHeading": "المحتويات القابلة للتنزيل {0}",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "Cheats verfügbar für {0} [{1}]",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"BuildId": "BuildId:",
|
||||
"DlcWindowHeading": "DLC verfügbar für {0} [{1}]",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "Διαθέσιμα Cheats για {0} [{1}]",
|
||||
"BuildId": "BuildId:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowHeading": "{0} Downloadable Content(s) available for {1} ({2})",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -802,7 +802,7 @@
|
||||
"CheatWindowHeading": "Cheats Available for {0} [{1}]",
|
||||
"BuildId": "BuildId:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowHeading": "{0} Downloadable Content(s) available for {1} ({2})",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -787,7 +787,7 @@
|
||||
"UpdateWindowBundledContentNotice": "Las actualizaciones agrupadas no pueden ser eliminadas, solamente deshabilitadas.",
|
||||
"CheatWindowHeading": "Cheats disponibles para {0} [{1}]",
|
||||
"BuildId": "Id de compilación:",
|
||||
"DlcWindowHeading": "Contenido descargable disponible para {0} [{1}]",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "Se agregaron {0} nuevo(s) contenido(s) descargable(s)",
|
||||
"AutoloadDlcAddedMessage": "Se agregaron {0} nuevo(s) contenido(s) descargable(s)",
|
||||
"AutoloadDlcRemovedMessage": "Se eliminaron {0} contenido(s) descargable(s) faltantes",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "Cheats disponibles pour {0} [{1}]",
|
||||
"BuildId": "BuildId :",
|
||||
"DlcWindowBundledContentNotice": "Les DLC inclus avec le jeu ne peuvent pas être supprimés mais peuvent être désactivés.",
|
||||
"DlcWindowHeading": "{0} Contenu(s) téléchargeable(s)",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} nouveau(x) contenu(s) téléchargeable(s) ajouté(s)",
|
||||
"AutoloadDlcAddedMessage": "{0} nouveau(x) contenu(s) téléchargeable(s) ajouté(s)",
|
||||
"AutoloadDlcRemovedMessage": "{0} contenu(s) téléchargeable(s) manquant(s) supprimé(s)",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "Trucchi disponibili per {0} [{1}]",
|
||||
"BuildId": "ID Build",
|
||||
"DlcWindowBundledContentNotice": "i DLC \"impacchettati\" non possono essere rimossi, ma solo disabilitati.",
|
||||
"DlcWindowHeading": "DLC disponibili per {0} [{1}]",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} nuovo/i contenuto/i scaricabile/i aggiunto/i",
|
||||
"AutoloadDlcAddedMessage": "{0} contenuto/i scaricabile/i aggiunto/i",
|
||||
"AutoloadDlcRemovedMessage": "{0} contenuto/i scaricabile/i mancante/i rimosso/i",
|
||||
|
||||
@@ -787,7 +787,7 @@
|
||||
"UpdateWindowBundledContentNotice": "Bundled updates cannot be removed, only disabled.",
|
||||
"CheatWindowHeading": "利用可能なチート {0} [{1}]",
|
||||
"BuildId": "ビルドID:",
|
||||
"DlcWindowHeading": "利用可能な DLC {0} [{1}]",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "{0} [{1}]에 사용 가능한 치트",
|
||||
"BuildId": "빌드ID:",
|
||||
"DlcWindowBundledContentNotice": "번들 DLC는 제거할 수 없으며 비활성화만 가능합니다.",
|
||||
"DlcWindowHeading": "{1} ({2})에 내려받기 가능한 콘텐츠 {0}개 사용 가능",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0}개의 새로운 내려받기 가능한 콘텐츠가 추가됨",
|
||||
"AutoloadDlcAddedMessage": "{0}개의 새로운 내려받기 가능한 콘텐츠가 추가됨",
|
||||
"AutoloadDlcRemovedMessage": "{0}개의 내려받기 가능한 콘텐츠가 제거됨",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "Kody Dostępne dla {0} [{1}]",
|
||||
"BuildId": "Identyfikator wersji:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowHeading": "{0} Zawartości do Pobrania dostępna dla {1} ({2})",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -787,7 +787,7 @@
|
||||
"CheatWindowHeading": "Cheats disponíveis para {0} [{1}]",
|
||||
"BuildId": "ID da Build:",
|
||||
"DlcWindowBundledContentNotice": "DLCs incorporadas não podem ser removidas, apenas desativadas.",
|
||||
"DlcWindowHeading": "{0} DLCs disponíveis para {1} ({2})",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} novo(s) conteúdo(s) para download adicionado(s)",
|
||||
"AutoloadDlcAddedMessage": "{0} novo(s) conteúdo(s) para download adicionado(s)",
|
||||
"AutoloadDlcRemovedMessage": "{0} conteúdo(s) para download ausente(s) removido(s)",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "Доступные читы для {0} [{1}]",
|
||||
"BuildId": "ID версии:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowHeading": "{0} DLC",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "สูตรโกงมีให้สำหรับ {0} [{1}]",
|
||||
"BuildId": "รหัสการสร้าง:",
|
||||
"DlcWindowBundledContentNotice": "แพ็ค DLC ไม่สามารถลบทิ้งได้ สามารถปิดใช้งานได้เท่านั้น",
|
||||
"DlcWindowHeading": "{0} DLC ที่สามารถดาวน์โหลดได้",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} DLC ใหม่ที่เพิ่มเข้ามา",
|
||||
"AutoloadDlcAddedMessage": "{0} ใหม่ที่เพิ่มเข้ามา",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "{0} için Hile mevcut [{1}]",
|
||||
"BuildId": "BuildId:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowHeading": "{0} Downloadable Content(s) available for {1} ({2})",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "Коди доступні для {0} [{1}]",
|
||||
"BuildId": "ID збірки:",
|
||||
"DlcWindowBundledContentNotice": "Bundled DLC cannot be removed, only disabled.",
|
||||
"DlcWindowHeading": "Вміст для завантаження, доступний для {1} ({2}): {0}",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcAddedMessage": "{0} new downloadable content(s) added",
|
||||
"AutoloadDlcRemovedMessage": "{0} missing downloadable content(s) removed",
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
"CheatWindowHeading": "可用於 {0} [{1}] 的密技",
|
||||
"BuildId": "組建識別碼:",
|
||||
"DlcWindowBundledContentNotice": "附帶的 DLC 只能被停用而無法被刪除。",
|
||||
"DlcWindowHeading": "{0} 個可下載內容",
|
||||
"DlcWindowHeading": "{0} DLC(s) available",
|
||||
"DlcWindowDlcAddedMessage": "已加入 {0} 個 DLC",
|
||||
"AutoloadDlcAddedMessage": "已加入 {0} 個 DLC",
|
||||
"AutoloadDlcRemovedMessage": "已刪除 {0} 個遺失的 DLC",
|
||||
|
||||
@@ -61,23 +61,17 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
private void RemoveDLC(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button button)
|
||||
if (sender is Button { DataContext: DownloadableContentModel dlc })
|
||||
{
|
||||
if (button.DataContext is DownloadableContentModel model)
|
||||
{
|
||||
ViewModel.Remove(model);
|
||||
}
|
||||
ViewModel.Remove(dlc);
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenLocation(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button button)
|
||||
if (sender is Button { DataContext: DownloadableContentModel dlc })
|
||||
{
|
||||
if (button.DataContext is DownloadableContentModel model)
|
||||
{
|
||||
OpenHelper.LocateFile(model.ContainerPath);
|
||||
}
|
||||
OpenHelper.LocateFile(dlc.ContainerPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user