aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml.cs')
-rw-r--r--src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml.cs b/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml.cs
index f5bba7d2..df6b123b 100644
--- a/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml.cs
+++ b/src/Ryujinx.Ava/UI/Windows/CheatWindow.axaml.cs
@@ -1,11 +1,12 @@
-using Avalonia;
-using Avalonia.Collections;
+using Avalonia.Collections;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Models;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS;
using Ryujinx.Ui.App.Common;
+using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Linq;
@@ -36,16 +37,16 @@ namespace Ryujinx.Ava.UI.Windows
Heading = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.CheatWindowHeading, titleName, titleId.ToUpper());
BuildId = ApplicationData.GetApplicationBuildId(virtualFileSystem, titlePath);
-
+
InitializeComponent();
string modsBasePath = ModLoader.GetModsBasePath();
string titleModsPath = ModLoader.GetTitleDir(modsBasePath, titleId);
- ulong titleIdValue = ulong.Parse(titleId, System.Globalization.NumberStyles.HexNumber);
+ ulong titleIdValue = ulong.Parse(titleId, NumberStyles.HexNumber);
_enabledCheatsPath = Path.Combine(titleModsPath, "cheats", "enabled.txt");
- string[] enabled = { };
+ string[] enabled = Array.Empty<string>();
if (File.Exists(_enabledCheatsPath))
{
@@ -60,7 +61,6 @@ namespace Ryujinx.Ava.UI.Windows
string currentCheatFile = string.Empty;
string buildId = string.Empty;
- string parentPath = string.Empty;
CheatsList currentGroup = null;
@@ -69,7 +69,7 @@ namespace Ryujinx.Ava.UI.Windows
if (cheat.Path.FullName != currentCheatFile)
{
currentCheatFile = cheat.Path.FullName;
- parentPath = currentCheatFile.Replace(titleModsPath, "");
+ string parentPath = currentCheatFile.Replace(titleModsPath, "");
buildId = Path.GetFileNameWithoutExtension(currentCheatFile).ToUpper();
currentGroup = new CheatsList(buildId, parentPath);
@@ -89,7 +89,7 @@ namespace Ryujinx.Ava.UI.Windows
}
DataContext = this;
-
+
Title = $"Ryujinx {Program.Version} - " + LocaleManager.Instance[LocaleKeys.CheatWindowTitle];
}
@@ -100,7 +100,7 @@ namespace Ryujinx.Ava.UI.Windows
return;
}
- List<string> enabledCheats = new List<string>();
+ List<string> enabledCheats = new();
foreach (var cheats in LoadedCheats)
{
@@ -120,4 +120,4 @@ namespace Ryujinx.Ava.UI.Windows
Close();
}
}
-} \ No newline at end of file
+}