diff --git a/Ryujinx/Config.json b/Ryujinx/Config.json
index 177b698c4d..8463081fab 100644
--- a/Ryujinx/Config.json
+++ b/Ryujinx/Config.json
@@ -89,7 +89,6 @@
},
"right_joycon": {
"stick": "Axis3",
- "stick_y": "Button0",
"stick_button": "Button9",
"button_a": "Button1",
"button_b": "Button0",
diff --git a/Ryujinx/RPsupported.dat b/Ryujinx/RPsupported.dat
index b2325eac02..c58195bab9 100644
--- a/Ryujinx/RPsupported.dat
+++ b/Ryujinx/RPsupported.dat
@@ -23,12 +23,14 @@
01007a4008486000
01007ef00011e000
010080b00ad66000
+01008db008c2c000
010094e00b52e000
01009aa000faa000
01009b90006dc000
01009cc00c97c000
0100a4200a284000
0100a5c00d162000
+0100abf008968000
0100ae000aebc000
0100b3f000be2000
0100bc2004ff4000
diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj
index bb9578f87b..82703dd33f 100644
--- a/Ryujinx/Ryujinx.csproj
+++ b/Ryujinx/Ryujinx.csproj
@@ -32,16 +32,16 @@
-
-
-
-
-
+
+
+
+
+
-
+
@@ -52,16 +52,16 @@
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/Ryujinx/Ui/AboutWindow.cs b/Ryujinx/Ui/AboutWindow.cs
index 8fd1c0b1dc..2ef83931e7 100644
--- a/Ryujinx/Ui/AboutWindow.cs
+++ b/Ryujinx/Ui/AboutWindow.cs
@@ -39,8 +39,8 @@ namespace Ryujinx.UI
{
builder.Autoconnect(this);
- _aboutWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
- _ryujinxLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png", 100, 100);
+ _aboutWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png");
+ _ryujinxLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png" , 100, 100);
_patreonLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.PatreonLogo.png", 30 , 30 );
_gitHubLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.GitHubLogo.png" , 30 , 30 );
_discordLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.DiscordLogo.png", 30 , 30 );
@@ -63,7 +63,7 @@ namespace Ryujinx.UI
}
}
- private void OpenUrl(string url)
+ private static void OpenUrl(string url)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
diff --git a/Ryujinx/Ui/ApplicationAddedEventArgs.cs b/Ryujinx/Ui/ApplicationAddedEventArgs.cs
new file mode 100644
index 0000000000..3a8e7d18aa
--- /dev/null
+++ b/Ryujinx/Ui/ApplicationAddedEventArgs.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace Ryujinx.UI
+{
+ public class ApplicationAddedEventArgs : EventArgs
+ {
+ public ApplicationData AppData { get; set; }
+ public int NumAppsFound { get; set; }
+ public int NumAppsLoaded { get; set; }
+ }
+}
diff --git a/Ryujinx/Ui/ApplicationData.cs b/Ryujinx/Ui/ApplicationData.cs
new file mode 100644
index 0000000000..8950d09d3d
--- /dev/null
+++ b/Ryujinx/Ui/ApplicationData.cs
@@ -0,0 +1,17 @@
+namespace Ryujinx.UI
+{
+ public struct ApplicationData
+ {
+ public bool Favorite { get; set; }
+ public byte[] Icon { get; set; }
+ public string TitleName { get; set; }
+ public string TitleId { get; set; }
+ public string Developer { get; set; }
+ public string Version { get; set; }
+ public string TimePlayed { get; set; }
+ public string LastPlayed { get; set; }
+ public string FileExtension { get; set; }
+ public string FileSize { get; set; }
+ public string Path { get; set; }
+ }
+}
diff --git a/Ryujinx/Ui/ApplicationLibrary.cs b/Ryujinx/Ui/ApplicationLibrary.cs
index 1ab2b4a066..e81c77e2d4 100644
--- a/Ryujinx/Ui/ApplicationLibrary.cs
+++ b/Ryujinx/Ui/ApplicationLibrary.cs
@@ -15,8 +15,8 @@ using System.Reflection;
using System.Text;
using Utf8Json;
using Utf8Json.Resolvers;
-using ApplicationData = Ryujinx.UI.ApplicationLibrary.ApplicationData;
-using SystemState = Ryujinx.HLE.HOS.SystemState;
+
+using TitleLanguage = Ryujinx.HLE.HOS.SystemState.TitleLanguage;
namespace Ryujinx.UI
{
@@ -24,45 +24,22 @@ namespace Ryujinx.UI
{
public static event EventHandler ApplicationAdded;
- public struct ApplicationData
- {
- public bool Favorite { get; set; }
- public byte[] Icon { get; set; }
- public string TitleName { get; set; }
- public string TitleId { get; set; }
- public string Developer { get; set; }
- public string Version { get; set; }
- public string TimePlayed { get; set; }
- public string LastPlayed { get; set; }
- public string FileExtension { get; set; }
- public string FileSize { get; set; }
- public string Path { get; set; }
- }
-
- private static readonly byte[] _ryujinxNspIcon = GetResourceBytes("Ryujinx.Ui.assets.ryujinxNSPIcon.png");
- private static readonly byte[] _ryujinxXciIcon = GetResourceBytes("Ryujinx.Ui.assets.ryujinxXCIIcon.png");
- private static readonly byte[] _ryujinxNcaIcon = GetResourceBytes("Ryujinx.Ui.assets.ryujinxNCAIcon.png");
- private static readonly byte[] _ryujinxNroIcon = GetResourceBytes("Ryujinx.Ui.assets.ryujinxNROIcon.png");
- private static readonly byte[] _ryujinxNsoIcon = GetResourceBytes("Ryujinx.Ui.assets.ryujinxNSOIcon.png");
-
- private static Keyset _keySet;
- private static SystemState.TitleLanguage _desiredTitleLanguage;
-
- private struct ApplicationMetadata
- {
- public bool Favorite { get; set; }
- public double TimePlayed { get; set; }
- public string LastPlayed { get; set; }
- }
+ private static readonly byte[] _nspIcon = GetResourceBytes("Ryujinx.Ui.assets.NSPIcon.png");
+ private static readonly byte[] _xciIcon = GetResourceBytes("Ryujinx.Ui.assets.XCIIcon.png");
+ private static readonly byte[] _ncaIcon = GetResourceBytes("Ryujinx.Ui.assets.NCAIcon.png");
+ private static readonly byte[] _nroIcon = GetResourceBytes("Ryujinx.Ui.assets.NROIcon.png");
+ private static readonly byte[] _nsoIcon = GetResourceBytes("Ryujinx.Ui.assets.NSOIcon.png");
+ private static Keyset _keySet;
+ private static TitleLanguage _desiredTitleLanguage;
private static ApplicationMetadata _appMetadata;
- public static void LoadApplications(List appDirs, Keyset keySet, SystemState.TitleLanguage desiredTitleLanguage)
+ public static void LoadApplications(List appDirs, Keyset keySet, TitleLanguage desiredTitleLanguage)
{
int numApplicationsFound = 0;
int numApplicationsLoaded = 0;
- _keySet = keySet;
+ _keySet = keySet;
_desiredTitleLanguage = desiredTitleLanguage;
// Builds the applications list with paths to found applications
@@ -76,8 +53,7 @@ namespace Ryujinx.UI
continue;
}
- string[] apps = Directory.GetFiles(appDir, "*.*", SearchOption.AllDirectories);
- foreach (string app in apps)
+ foreach (string app in Directory.GetFiles(appDir, "*.*", SearchOption.AllDirectories))
{
if ((Path.GetExtension(app) == ".xci") ||
(Path.GetExtension(app) == ".nro") ||
@@ -97,7 +73,8 @@ namespace Ryujinx.UI
foreach (DirectoryEntryEx fileEntry in nsp.EnumerateEntries("/", "*.nca"))
{
nsp.OpenFile(out IFile ncaFile, fileEntry.FullPath, OpenMode.Read).ThrowIfFailure();
- Nca nca = new Nca(_keySet, ncaFile.AsStorage());
+
+ Nca nca = new Nca(_keySet, ncaFile.AsStorage());
int dataIndex = Nca.GetSectionIndexFromType(NcaSectionType.Data, NcaContentType.Program);
if (nca.Header.ContentType == NcaContentType.Program && !nca.Header.GetFsHeader(dataIndex).IsPatchSection())
@@ -106,7 +83,10 @@ namespace Ryujinx.UI
}
}
- if (!hasMainNca) continue;
+ if (!hasMainNca)
+ {
+ continue;
+ }
}
catch (InvalidDataException)
{
@@ -120,7 +100,7 @@ namespace Ryujinx.UI
{
try
{
- Nca nca = new Nca(_keySet, new FileStream(app, FileMode.Open, FileAccess.Read).AsStorage());
+ Nca nca = new Nca(_keySet, new FileStream(app, FileMode.Open, FileAccess.Read).AsStorage());
int dataIndex = Nca.GetSectionIndexFromType(NcaSectionType.Data, NcaContentType.Program);
if (nca.Header.ContentType != NcaContentType.Program || nca.Header.GetFsHeader(dataIndex).IsPatchSection())
@@ -146,7 +126,7 @@ namespace Ryujinx.UI
string titleName = "Unknown";
string titleId = "0000000000000000";
string developer = "Unknown";
- string version = "?";
+ string version = "0";
byte[] applicationIcon = null;
using (FileStream file = new FileStream(applicationPath, FileMode.Open, FileAccess.Read))
@@ -176,7 +156,7 @@ namespace Ryujinx.UI
// If this is null then this is probably not a normal NSP, it's probably an ExeFS as an NSP
if (controlFs == null)
{
- applicationIcon = _ryujinxNspIcon;
+ applicationIcon = _nspIcon;
Result result = pfs.OpenFile(out IFile npdmFile, "/main.npdm", OpenMode.Read);
@@ -260,20 +240,20 @@ namespace Ryujinx.UI
if (applicationIcon == null)
{
- applicationIcon = Path.GetExtension(applicationPath) == ".xci" ? _ryujinxXciIcon : _ryujinxNspIcon;
+ applicationIcon = Path.GetExtension(applicationPath) == ".xci" ? _xciIcon : _nspIcon;
}
}
}
}
catch (MissingKeyException exception)
{
- applicationIcon = Path.GetExtension(applicationPath) == ".xci" ? _ryujinxXciIcon : _ryujinxNspIcon;
+ applicationIcon = Path.GetExtension(applicationPath) == ".xci" ? _xciIcon : _nspIcon;
Logger.PrintWarning(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}");
}
catch (InvalidDataException)
{
- applicationIcon = Path.GetExtension(applicationPath) == ".xci" ? _ryujinxXciIcon : _ryujinxNspIcon;
+ applicationIcon = Path.GetExtension(applicationPath) == ".xci" ? _xciIcon : _nspIcon;
Logger.PrintWarning(LogClass.Application, $"The header key is incorrect or missing and therefore the NCA header content type check has failed. Errored File: {applicationPath}");
}
@@ -306,57 +286,59 @@ namespace Ryujinx.UI
applicationIcon = Read(assetOffset + iconOffset, (int)iconSize);
// Creates memory stream out of byte array which is the NACP
- using MemoryStream stream = new MemoryStream(Read(assetOffset + (int)nacpOffset, (int)nacpSize));
- // Creates NACP class from the memory stream
- Nacp controlData = new Nacp(stream);
-
- // Get the title name, title ID, developer name and version number from the NACP
- version = controlData.DisplayVersion;
-
- titleName = controlData.Descriptions[(int)_desiredTitleLanguage].Title;
-
- if (string.IsNullOrWhiteSpace(titleName))
+ using (MemoryStream stream = new MemoryStream(Read(assetOffset + (int) nacpOffset, (int) nacpSize)))
{
- titleName = controlData.Descriptions.ToList().Find(x => !string.IsNullOrWhiteSpace(x.Title)).Title;
- }
+ // Creates NACP class from the memory stream
+ Nacp controlData = new Nacp(stream);
- titleId = controlData.PresenceGroupId.ToString("x16");
+ // Get the title name, title ID, developer name and version number from the NACP
+ version = controlData.DisplayVersion;
- if (string.IsNullOrWhiteSpace(titleId))
- {
- titleId = controlData.SaveDataOwnerId.ToString("x16");
- }
+ titleName = controlData.Descriptions[(int)_desiredTitleLanguage].Title;
- if (string.IsNullOrWhiteSpace(titleId))
- {
- titleId = (controlData.AddOnContentBaseId - 0x1000).ToString("x16");
- }
+ if (string.IsNullOrWhiteSpace(titleName))
+ {
+ titleName = controlData.Descriptions.ToList().Find(x => !string.IsNullOrWhiteSpace(x.Title)).Title;
+ }
- developer = controlData.Descriptions[(int)_desiredTitleLanguage].Developer;
+ titleId = controlData.PresenceGroupId.ToString("x16");
- if (string.IsNullOrWhiteSpace(developer))
- {
- developer = controlData.Descriptions.ToList().Find(x => !string.IsNullOrWhiteSpace(x.Developer)).Developer;
+ if (string.IsNullOrWhiteSpace(titleId))
+ {
+ titleId = controlData.SaveDataOwnerId.ToString("x16");
+ }
+
+ if (string.IsNullOrWhiteSpace(titleId))
+ {
+ titleId = (controlData.AddOnContentBaseId - 0x1000).ToString("x16");
+ }
+
+ developer = controlData.Descriptions[(int)_desiredTitleLanguage].Developer;
+
+ if (string.IsNullOrWhiteSpace(developer))
+ {
+ developer = controlData.Descriptions.ToList().Find(x => !string.IsNullOrWhiteSpace(x.Developer)).Developer;
+ }
}
}
else
{
- applicationIcon = _ryujinxNroIcon;
+ applicationIcon = _nroIcon;
}
}
// If its an NCA or NSO we just set defaults
else if ((Path.GetExtension(applicationPath) == ".nca") || (Path.GetExtension(applicationPath) == ".nso"))
{
- applicationIcon = Path.GetExtension(applicationPath) == ".nca" ? _ryujinxNcaIcon : _ryujinxNsoIcon;
+ applicationIcon = Path.GetExtension(applicationPath) == ".nca" ? _ncaIcon : _nsoIcon;
titleName = Path.GetFileNameWithoutExtension(applicationPath);
}
}
- (bool fav, string timePlayed, string lastPlayed) = GetMetadata(titleId);
+ (bool favorite, string timePlayed, string lastPlayed) = GetMetadata(titleId);
ApplicationData data = new ApplicationData()
{
- Favorite = fav,
+ Favorite = favorite,
Icon = applicationIcon,
TitleName = titleName,
TitleId = titleId,
@@ -429,7 +411,7 @@ namespace Ryujinx.UI
return controlNca?.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.None);
}
- private static (bool fav, string timePlayed, string lastPlayed) GetMetadata(string titleId)
+ private static (bool favorite, string timePlayed, string lastPlayed) GetMetadata(string titleId)
{
string metadataFolder = Path.Combine(new VirtualFileSystem().GetBasePath(), "games", titleId, "gui");
string metadataFile = Path.Combine(metadataFolder, "metadata.json");
@@ -463,7 +445,8 @@ namespace Ryujinx.UI
{
const int secondsPerMinute = 60;
const int secondsPerHour = secondsPerMinute * 60;
- const int secondsPerDay = secondsPerHour * 24;
+ const int secondsPerDay = secondsPerHour * 24;
+
string readableString;
if (seconds < secondsPerMinute)
@@ -486,11 +469,4 @@ namespace Ryujinx.UI
return readableString;
}
}
-
- public class ApplicationAddedEventArgs : EventArgs
- {
- public ApplicationData AppData { get; set; }
- public int NumAppsFound { get; set; }
- public int NumAppsLoaded { get; set; }
- }
}
diff --git a/Ryujinx/Ui/ApplicationMetadata.cs b/Ryujinx/Ui/ApplicationMetadata.cs
new file mode 100644
index 0000000000..f0264c7096
--- /dev/null
+++ b/Ryujinx/Ui/ApplicationMetadata.cs
@@ -0,0 +1,9 @@
+namespace Ryujinx.UI
+{
+ public struct ApplicationMetadata
+ {
+ public bool Favorite { get; set; }
+ public double TimePlayed { get; set; }
+ public string LastPlayed { get; set; }
+ }
+}
diff --git a/Ryujinx/Ui/GuiColumns.cs b/Ryujinx/Ui/GuiColumns.cs
new file mode 100644
index 0000000000..6957c68132
--- /dev/null
+++ b/Ryujinx/Ui/GuiColumns.cs
@@ -0,0 +1,16 @@
+namespace Ryujinx.UI
+{
+ public struct GuiColumns
+ {
+ public bool FavColumn;
+ public bool IconColumn;
+ public bool AppColumn;
+ public bool DevColumn;
+ public bool VersionColumn;
+ public bool TimePlayedColumn;
+ public bool LastPlayedColumn;
+ public bool FileExtColumn;
+ public bool FileSizeColumn;
+ public bool PathColumn;
+ }
+}
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs
index 6d6342f1f2..b29a20a53b 100644
--- a/Ryujinx/Ui/MainWindow.cs
+++ b/Ryujinx/Ui/MainWindow.cs
@@ -21,20 +21,6 @@ using System.Threading.Tasks;
namespace Ryujinx.UI
{
- public struct GuiColumns
- {
- public bool FavColumn;
- public bool IconColumn;
- public bool AppColumn;
- public bool DevColumn;
- public bool VersionColumn;
- public bool TimePlayedColumn;
- public bool LastPlayedColumn;
- public bool FileExtColumn;
- public bool FileSizeColumn;
- public bool PathColumn;
- }
-
public class MainWindow : Window
{
private static HLE.Switch _device;
@@ -63,13 +49,6 @@ namespace Ryujinx.UI
private static TreeView _treeView;
- private struct ApplicationMetadata
- {
- public bool Favorite { get; set; }
- public double TimePlayed { get; set; }
- public string LastPlayed { get; set; }
- }
-
public static bool DiscordIntegrationEnabled { get; set; }
public static DiscordRpcClient DiscordClient;
@@ -139,7 +118,7 @@ namespace Ryujinx.UI
DiscordClient.SetPresence(DiscordPresence);
}
- _mainWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
+ _mainWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png");
_stopEmulation.Sensitive = false;
if (SwitchSettings.SwitchConfig.GuiColumns.FavColumn) { _favToggle.Active = true; }
@@ -171,7 +150,7 @@ namespace Ryujinx.UI
MessageDialog errorDialog = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, null)
{
Title = "Ryujinx - Error",
- Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png"),
+ Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png"),
Text = "Ryujinx has encountered an Error",
SecondaryText = errorMessage,
WindowPosition = WindowPosition.Center
@@ -183,7 +162,10 @@ namespace Ryujinx.UI
internal static void ApplyTheme()
{
- if (!SwitchSettings.SwitchConfig.EnableCustomTheme) return;
+ if (!SwitchSettings.SwitchConfig.EnableCustomTheme)
+ {
+ return;
+ }
if (File.Exists(SwitchSettings.SwitchConfig.CustomThemePath) && (System.IO.Path.GetExtension(SwitchSettings.SwitchConfig.CustomThemePath) == ".css"))
{
@@ -222,7 +204,7 @@ namespace Ryujinx.UI
foreach (TreeViewColumn column in _gameTable.Columns)
{
- if (column.Title == "Fav") { _favColumn = column; }
+ if (column.Title == "Fav") { _favColumn = column; }
else if (column.Title == "Application") { _appColumn = column; }
else if (column.Title == "Developer") { _devColumn = column; }
else if (column.Title == "Version") { _versionColumn = column; }
@@ -246,16 +228,18 @@ namespace Ryujinx.UI
internal static async Task UpdateGameTable()
{
- if (_updatingGameTable) return;
+ if (_updatingGameTable)
+ {
+ return;
+ }
+
+ _updatingGameTable = true;
- _updatingGameTable = true;
- _treeView.HeadersClickable = false;
_tableStore.Clear();
await Task.Run(() => ApplicationLibrary.LoadApplications(SwitchSettings.SwitchConfig.GameDirs, _device.System.KeySet, _device.System.State.DesiredTitleLanguage));
- _treeView.HeadersClickable = true;
- _updatingGameTable = false;
+ _updatingGameTable = false;
}
internal void LoadApplication(string path)
@@ -372,6 +356,7 @@ namespace Ryujinx.UI
string metadataFile = System.IO.Path.Combine(metadataFolder, "metadata.json");
IJsonFormatterResolver resolver = CompositeResolver.Create(new[] { StandardResolver.AllowPrivateSnakeCase });
+
ApplicationMetadata appMetadata;
if (!File.Exists(metadataFile))
@@ -415,7 +400,10 @@ namespace Ryujinx.UI
private static void End()
{
- if (_ending) return;
+ if (_ending)
+ {
+ return;
+ }
_ending = true;
@@ -425,6 +413,7 @@ namespace Ryujinx.UI
string metadataFile = System.IO.Path.Combine(metadataFolder, "metadata.json");
IJsonFormatterResolver resolver = CompositeResolver.Create(new[] { StandardResolver.AllowPrivateSnakeCase });
+
ApplicationMetadata appMetadata;
if (!File.Exists(metadataFile))
@@ -495,10 +484,12 @@ namespace Ryujinx.UI
private void FavToggle_Toggled(object sender, ToggledArgs args)
{
_tableStore.GetIter(out TreeIter treeIter, new TreePath(args.Path));
- string titleid = _tableStore.GetValue(treeIter, 2).ToString().Split("\n")[1].ToLower();
- string metadataPath = System.IO.Path.Combine(new VirtualFileSystem().GetBasePath(), "games", titleid, "gui", "metadata.json");
+
+ string titleId = _tableStore.GetValue(treeIter, 2).ToString().Split("\n")[1].ToLower();
+ string metadataPath = System.IO.Path.Combine(new VirtualFileSystem().GetBasePath(), "games", titleId, "gui", "metadata.json");
IJsonFormatterResolver resolver = CompositeResolver.Create(new[] { StandardResolver.AllowPrivateSnakeCase });
+
ApplicationMetadata appMetadata;
using (Stream stream = File.OpenRead(metadataPath))
@@ -633,7 +624,8 @@ namespace Ryujinx.UI
private void Fav_Toggled(object sender, EventArgs args)
{
GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.FavColumn = _favToggle.Active;
+
+ updatedColumns.FavColumn = _favToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -644,7 +636,8 @@ namespace Ryujinx.UI
private void Icon_Toggled(object sender, EventArgs args)
{
GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.IconColumn = _iconToggle.Active;
+
+ updatedColumns.IconColumn = _iconToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -655,7 +648,8 @@ namespace Ryujinx.UI
private void Title_Toggled(object sender, EventArgs args)
{
GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.AppColumn = _appToggle.Active;
+
+ updatedColumns.AppColumn = _appToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -666,7 +660,8 @@ namespace Ryujinx.UI
private void Developer_Toggled(object sender, EventArgs args)
{
GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.DevColumn = _developerToggle.Active;
+
+ updatedColumns.DevColumn = _developerToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -676,8 +671,9 @@ namespace Ryujinx.UI
private void Version_Toggled(object sender, EventArgs args)
{
- GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.VersionColumn = _versionToggle.Active;
+ GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
+
+ updatedColumns.VersionColumn = _versionToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -687,8 +683,9 @@ namespace Ryujinx.UI
private void TimePlayed_Toggled(object sender, EventArgs args)
{
- GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.TimePlayedColumn = _timePlayedToggle.Active;
+ GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
+
+ updatedColumns.TimePlayedColumn = _timePlayedToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -698,8 +695,9 @@ namespace Ryujinx.UI
private void LastPlayed_Toggled(object sender, EventArgs args)
{
- GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.LastPlayedColumn = _lastPlayedToggle.Active;
+ GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
+
+ updatedColumns.LastPlayedColumn = _lastPlayedToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -709,8 +707,9 @@ namespace Ryujinx.UI
private void FileExt_Toggled(object sender, EventArgs args)
{
- GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.FileExtColumn = _fileExtToggle.Active;
+ GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
+
+ updatedColumns.FileExtColumn = _fileExtToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -720,8 +719,9 @@ namespace Ryujinx.UI
private void FileSize_Toggled(object sender, EventArgs args)
{
- GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.FileSizeColumn = _fileSizeToggle.Active;
+ GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
+
+ updatedColumns.FileSizeColumn = _fileSizeToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -732,7 +732,8 @@ namespace Ryujinx.UI
private void Path_Toggled(object sender, EventArgs args)
{
GuiColumns updatedColumns = SwitchSettings.SwitchConfig.GuiColumns;
- updatedColumns.PathColumn = _pathToggle.Active;
+
+ updatedColumns.PathColumn = _pathToggle.Active;
SwitchSettings.SwitchConfig.GuiColumns = updatedColumns;
Configuration.SaveConfig(SwitchSettings.SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
@@ -786,9 +787,18 @@ namespace Ryujinx.UI
bValue = bValue.Substring(0, bValue.Length - 1);
}
- if (float.Parse(aValue) > float.Parse(bValue)) return -1;
- else if (float.Parse(bValue) > float.Parse(aValue)) return 1;
- else return 0;
+ if (float.Parse(aValue) > float.Parse(bValue))
+ {
+ return -1;
+ }
+ else if (float.Parse(bValue) > float.Parse(aValue))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
}
private static int LastPlayedSort(ITreeModel model, TreeIter a, TreeIter b)
@@ -796,8 +806,15 @@ namespace Ryujinx.UI
string aValue = model.GetValue(a, 6).ToString();
string bValue = model.GetValue(b, 6).ToString();
- if (aValue == "Never") aValue = DateTime.UnixEpoch.ToString();
- if (bValue == "Never") bValue = DateTime.UnixEpoch.ToString();
+ if (aValue == "Never")
+ {
+ aValue = DateTime.UnixEpoch.ToString();
+ }
+
+ if (bValue == "Never")
+ {
+ bValue = DateTime.UnixEpoch.ToString();
+ }
return DateTime.Compare(DateTime.Parse(bValue), DateTime.Parse(aValue));
}
@@ -811,17 +828,32 @@ namespace Ryujinx.UI
{
aValue = (float.Parse(aValue[0..^2]) * 1024).ToString();
}
- else aValue = aValue[0..^2];
+ else
+ {
+ aValue = aValue[0..^2];
+ }
if (bValue.Substring(bValue.Length - 2) == "GB")
{
bValue = (float.Parse(bValue[0..^2]) * 1024).ToString();
}
- else bValue = bValue[0..^2];
+ else
+ {
+ bValue = bValue[0..^2];
+ }
- if (float.Parse(aValue) > float.Parse(bValue)) return -1;
- else if (float.Parse(bValue) > float.Parse(aValue)) return 1;
- else return 0;
+ if (float.Parse(aValue) > float.Parse(bValue))
+ {
+ return -1;
+ }
+ else if (float.Parse(bValue) > float.Parse(aValue))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
}
}
}
diff --git a/Ryujinx/Ui/NpadController.cs b/Ryujinx/Ui/NpadController.cs
index c0baf9fb42..6f2d6b7c58 100644
--- a/Ryujinx/Ui/NpadController.cs
+++ b/Ryujinx/Ui/NpadController.cs
@@ -64,7 +64,6 @@ namespace Ryujinx.UI.Input
public struct NpadControllerRight
{
public ControllerInputId Stick;
- public ControllerInputId StickY;
public ControllerInputId StickButton;
public ControllerInputId ButtonA;
public ControllerInputId ButtonB;
diff --git a/Ryujinx/Ui/SwitchSettings.cs b/Ryujinx/Ui/SwitchSettings.cs
index 14030b239b..72b9e9bcb7 100644
--- a/Ryujinx/Ui/SwitchSettings.cs
+++ b/Ryujinx/Ui/SwitchSettings.cs
@@ -92,7 +92,7 @@ namespace Ryujinx.UI
_device = device;
- _settingsWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
+ _settingsWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.Icon.png");
_controller1Image.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.JoyCon.png", 500, 500);
//Bind Events
diff --git a/Ryujinx/Ui/assets/ryujinxIcon.png b/Ryujinx/Ui/assets/Icon.png
similarity index 100%
rename from Ryujinx/Ui/assets/ryujinxIcon.png
rename to Ryujinx/Ui/assets/Icon.png
diff --git a/Ryujinx/Ui/assets/ryujinxNCAIcon.png b/Ryujinx/Ui/assets/NCAIcon.png
similarity index 100%
rename from Ryujinx/Ui/assets/ryujinxNCAIcon.png
rename to Ryujinx/Ui/assets/NCAIcon.png
diff --git a/Ryujinx/Ui/assets/ryujinxNROIcon.png b/Ryujinx/Ui/assets/NROIcon.png
similarity index 100%
rename from Ryujinx/Ui/assets/ryujinxNROIcon.png
rename to Ryujinx/Ui/assets/NROIcon.png
diff --git a/Ryujinx/Ui/assets/ryujinxNSOIcon.png b/Ryujinx/Ui/assets/NSOIcon.png
similarity index 100%
rename from Ryujinx/Ui/assets/ryujinxNSOIcon.png
rename to Ryujinx/Ui/assets/NSOIcon.png
diff --git a/Ryujinx/Ui/assets/ryujinxNSPIcon.png b/Ryujinx/Ui/assets/NSPIcon.png
similarity index 100%
rename from Ryujinx/Ui/assets/ryujinxNSPIcon.png
rename to Ryujinx/Ui/assets/NSPIcon.png
diff --git a/Ryujinx/Ui/assets/ryujinxXCIIcon.png b/Ryujinx/Ui/assets/XCIIcon.png
similarity index 100%
rename from Ryujinx/Ui/assets/ryujinxXCIIcon.png
rename to Ryujinx/Ui/assets/XCIIcon.png