UI: Link to the Discord in the About window, more Discord RPC games.

This commit is contained in:
Evan Husted
2024-10-12 21:44:13 -05:00
parent df9450d2ad
commit 456f1ec739
7 changed files with 25 additions and 29 deletions

View File

@ -51,7 +51,7 @@ namespace Ryujinx.Ava.UI.Windows
_enabledCheatsPath = Path.Combine(titleModsPath, "cheats", "enabled.txt");
string[] enabled = Array.Empty<string>();
string[] enabled = [];
if (File.Exists(_enabledCheatsPath))
{
@ -101,24 +101,13 @@ namespace Ryujinx.Ava.UI.Windows
public void Save()
{
if (NoCheatsFound)
{
return;
}
List<string> enabledCheats = new();
var enabledCheats = LoadedCheats.SelectMany(it => it.SubNodes)
.Where(it => it.IsEnabled)
.Select(it => it.BuildIdKey);
foreach (var cheats in LoadedCheats)
{
foreach (var cheat in cheats.SubNodes)
{
if (cheat.IsEnabled)
{
enabledCheats.Add(cheat.BuildIdKey);
}
}
}
Directory.CreateDirectory(Path.GetDirectoryName(_enabledCheatsPath));
Directory.CreateDirectory(Path.GetDirectoryName(_enabledCheatsPath)!);
File.WriteAllLines(_enabledCheatsPath, enabledCheats);