misc: chore: Use explicit types in the Avalonia project

This commit is contained in:
Evan Husted
2025-01-25 14:00:23 -06:00
parent 3b5f6170d1
commit be3bd0bcb5
69 changed files with 367 additions and 348 deletions

View File

@@ -6,6 +6,7 @@ using Ryujinx.Ava.Utilities.AppLibrary;
using Ryujinx.Ava.Utilities.Configuration;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -58,7 +59,7 @@ namespace Ryujinx.Ava.UI.Windows
int cheatAdded = 0;
var mods = new ModLoader.ModCache();
ModLoader.ModCache mods = new ModLoader.ModCache();
ModLoader.QueryContentsDir(mods, new DirectoryInfo(Path.Combine(modsBasePath, "contents")), titleIdValue);
@@ -67,7 +68,7 @@ namespace Ryujinx.Ava.UI.Windows
CheatNode currentGroup = null;
foreach (var cheat in mods.Cheats)
foreach (ModLoader.Cheat cheat in mods.Cheats)
{
if (cheat.Path.FullName != currentCheatFile)
{
@@ -80,7 +81,7 @@ namespace Ryujinx.Ava.UI.Windows
LoadedCheats.Add(currentGroup);
}
var model = new CheatNode(cheat.Name, buildId, string.Empty, false, enabled.Contains($"{buildId}-{cheat.Name}"));
CheatNode model = new CheatNode(cheat.Name, buildId, string.Empty, false, enabled.Contains($"{buildId}-{cheat.Name}"));
currentGroup?.SubNodes.Add(model);
cheatAdded++;
@@ -101,7 +102,7 @@ namespace Ryujinx.Ava.UI.Windows
if (NoCheatsFound)
return;
var enabledCheats = LoadedCheats.SelectMany(it => it.SubNodes)
IEnumerable<string> enabledCheats = LoadedCheats.SelectMany(it => it.SubNodes)
.Where(it => it.IsEnabled)
.Select(it => it.BuildIdKey);