diff --git a/Ryujinx/Ui/ApplicationLibrary.cs b/Ryujinx/Ui/ApplicationLibrary.cs index 2ac8e0c13c..f74d6f02ce 100644 --- a/Ryujinx/Ui/ApplicationLibrary.cs +++ b/Ryujinx/Ui/ApplicationLibrary.cs @@ -28,17 +28,17 @@ namespace Ryujinx.UI public struct ApplicationData { - public bool Fav { 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 FileExt { get; set; } - public string FileSize { get; set; } - public string Path { get; set; } + 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; } } public static List ApplicationLibraryData { get; private set; } @@ -52,7 +52,7 @@ namespace Ryujinx.UI private struct ApplicationMetadata { - public bool Fav { get; set; } + public bool Favorite { get; set; } public double TimePlayed { get; set; } public string LastPlayed { get; set; } } @@ -339,17 +339,17 @@ namespace Ryujinx.UI ApplicationData data = new ApplicationData() { - Fav = metaData.Item1, - Icon = applicationIcon, - TitleName = titleName, - TitleId = titleId, - Developer = developer, - Version = version, - TimePlayed = metaData.Item2, - LastPlayed = metaData.Item3, - FileExt = Path.GetExtension(applicationPath).ToUpper().Remove(0 ,1), - FileSize = (filesize < 1) ? (filesize * 1024).ToString("0.##") + "MB" : filesize.ToString("0.##") + "GB", - Path = applicationPath, + Favorite = metaData.Item1, + Icon = applicationIcon, + TitleName = titleName, + TitleId = titleId, + Developer = developer, + Version = version, + TimePlayed = metaData.Item2, + LastPlayed = metaData.Item3, + FileExtension = Path.GetExtension(applicationPath).ToUpper().Remove(0 ,1), + FileSize = (filesize < 1) ? (filesize * 1024).ToString("0.##") + "MB" : filesize.ToString("0.##") + "GB", + Path = applicationPath, }; ApplicationLibraryData.Add(data); @@ -413,7 +413,7 @@ namespace Ryujinx.UI AppMetadata = new ApplicationMetadata { - Fav = false, + Favorite = false, TimePlayed = 0, LastPlayed = "Never" }; @@ -446,7 +446,7 @@ namespace Ryujinx.UI timePlayed = $"{Math.Round(AppMetadata.TimePlayed / SecondsPerDay, 2, MidpointRounding.AwayFromZero)} days"; } - return (AppMetadata.Fav, timePlayed, AppMetadata.LastPlayed); + return (AppMetadata.Favorite, timePlayed, AppMetadata.LastPlayed); } private static byte[] NspOrXciIcon(string applicationPath) diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index b4c41697e7..8eff016556 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -49,7 +49,7 @@ namespace Ryujinx.UI private struct ApplicationMetadata { - public bool Fav { get; set; } + public bool Favorite { get; set; } public double TimePlayed { get; set; } public string LastPlayed { get; set; } } @@ -81,19 +81,23 @@ namespace Ryujinx.UI private MainWindow(Builder builder, string[] args, Application gtkApplication) : base(builder.GetObject("_mainWin").Handle) { + builder.Autoconnect(this); + + DeleteEvent += Window_Close; + _renderer = new OglRenderer(); _audioOut = InitializeAudioEngine(); _device = new HLE.Switch(_renderer, _audioOut); + _gtkApplication = gtkApplication; + Configuration.Load(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json")); Configuration.InitialConfigure(_device); ApplicationLibrary.Init(SwitchSettings.SwitchConfig.GameDirs, _device.System.KeySet, _device.System.State.DesiredTitleLanguage); - _gtkApplication = gtkApplication; - ApplyTheme(); if (DiscordIntegrationEnabled) @@ -115,10 +119,6 @@ namespace Ryujinx.UI DiscordClient.SetPresence(DiscordPresence); } - builder.Autoconnect(this); - - DeleteEvent += Window_Close; - _mainWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png"); _stopEmulation.Sensitive = false; @@ -223,7 +223,7 @@ namespace Ryujinx.UI foreach (ApplicationLibrary.ApplicationData AppData in ApplicationLibrary.ApplicationLibraryData) { - _tableStore.AppendValues(AppData.Fav, new Gdk.Pixbuf(AppData.Icon, 75, 75), $"{AppData.TitleName}\n{AppData.TitleId.ToUpper()}", AppData.Developer, AppData.Version, AppData.TimePlayed, AppData.LastPlayed, AppData.FileExt, AppData.FileSize, AppData.Path); + _tableStore.AppendValues(AppData.Favorite, new Gdk.Pixbuf(AppData.Icon, 75, 75), $"{AppData.TitleName}\n{AppData.TitleId.ToUpper()}", AppData.Developer, AppData.Version, AppData.TimePlayed, AppData.LastPlayed, AppData.FileExtension, AppData.FileSize, AppData.Path); } _tableStore.SetSortFunc(5, TimePlayedSort); @@ -353,7 +353,7 @@ namespace Ryujinx.UI AppMetadata = new ApplicationMetadata { - Fav = false, + Favorite = false, TimePlayed = 0, LastPlayed = "Never" }; @@ -406,7 +406,7 @@ namespace Ryujinx.UI AppMetadata = new ApplicationMetadata { - Fav = false, + Favorite = false, TimePlayed = 0, LastPlayed = "Never" }; @@ -474,13 +474,13 @@ namespace Ryujinx.UI { _tableStore.SetValue(treeIter, 0, false); - AppMetadata.Fav = false; + AppMetadata.Favorite = false; } else { _tableStore.SetValue(treeIter, 0, true); - AppMetadata.Fav = true; + AppMetadata.Favorite = true; } byte[] saveData = JsonSerializer.Serialize(AppMetadata, resolver); diff --git a/Ryujinx/Ui/MainWindow.glade b/Ryujinx/Ui/MainWindow.glade index 136b0fc688..2f84f206fa 100644 --- a/Ryujinx/Ui/MainWindow.glade +++ b/Ryujinx/Ui/MainWindow.glade @@ -126,7 +126,7 @@ True False - Select which GUI columns to enable (restart Ryujinx for these changes to take effect) + Select which GUI columns to enable Enable GUI Columns True diff --git a/Ryujinx/Ui/SwitchSettings.cs b/Ryujinx/Ui/SwitchSettings.cs index 81e4181f08..adff7b83b0 100644 --- a/Ryujinx/Ui/SwitchSettings.cs +++ b/Ryujinx/Ui/SwitchSettings.cs @@ -86,10 +86,10 @@ namespace Ryujinx.UI private SwitchSettings(Builder builder, HLE.Switch device) : base(builder.GetObject("_settingsWin").Handle) { - Device = device; - builder.Autoconnect(this); + Device = device; + _settingsWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png"); _controller1Image.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.JoyCon.png", 500, 500); diff --git a/Ryujinx/Ui/SwitchSettings.glade b/Ryujinx/Ui/SwitchSettings.glade index 7c0211133f..390267c7a3 100644 --- a/Ryujinx/Ui/SwitchSettings.glade +++ b/Ryujinx/Ui/SwitchSettings.glade @@ -139,6 +139,7 @@ True False Change System Language + 5 American English British English @@ -174,7 +175,7 @@ - Enable Discord Integration + Enable Discord Rich Presence True True False @@ -512,7 +513,7 @@ - + True False vertical @@ -521,7 +522,7 @@ True False 5 - 10 + 5 Enable Docked Mode @@ -563,816 +564,659 @@ - + True - True + False + + + False + True + 1 + + + + + True + False + 10 + 10 + 5 True False - 5 - 5 - 5 - 5 + vertical True False - vertical - + True False - - - True - False - The primary controller's type - center - 10 - 10 - 5 - 5 - Controller Type: - - - False - True - 0 - - - - - True - False - The primary controller's type - 5 - 0 - - Handheld - Pro Controller - Paired Joycons - Left Joycon - Right Joycon - - - - True - True - 1 - - - - - True - True - 10 - 0 - - - - - True - False - 2 - 5 - - - True - False - LStick Up - - - 0 - 0 - - - - - True - False - LStick Down - - - 0 - 1 - - - - - True - False - LStick Left - - - 0 - 2 - - - - - True - False - LStick Right - - - 0 - 3 - - - - - True - False - LStick Button - - - 0 - 4 - - - - - True - False - Dpad Up - - - 0 - 5 - - - - - True - False - Dpad Down - - - 0 - 6 - - - - - True - False - Dpad Left - - - 0 - 7 - - - - - True - False - Dpad Right - - - 0 - 8 - - - - - True - False - - - - - 0 - 9 - - - - - True - False - L - - - 0 - 10 - - - - - True - False - ZL - - - 0 - 11 - - - - - True - False - ZR - - - 2 - 11 - - - - - True - False - R - - - 2 - 10 - - - - - True - False - + - - - 2 - 9 - - - - - True - False - Y - - - 2 - 8 - - - - - True - False - X - - - 2 - 7 - - - - - True - False - B - - - 2 - 6 - - - - - True - False - A - - - 2 - 5 - - - - - True - False - RStick Button - - - 2 - 4 - - - - - True - False - RStick Right - - - 2 - 3 - - - - - True - False - RStick Left - - - 2 - 2 - - - - - True - False - RStick Down - - - 2 - 1 - - - - - True - False - RStick Up - - - 2 - 0 - - - - - - True - True - True - - - 1 - 0 - - - - - - True - True - True - - - 1 - 1 - - - - - - True - True - True - - - 1 - 2 - - - - - - True - True - True - - - 1 - 3 - - - - - - True - True - True - - - 1 - 4 - - - - - - True - True - True - - - 1 - 5 - - - - - - True - True - True - - - 1 - 6 - - - - - - True - True - True - - - 1 - 7 - - - - - - True - True - True - - - 1 - 8 - - - - - - True - True - True - - - 1 - 9 - - - - - - True - True - True - - - 1 - 10 - - - - - - True - True - True - - - 1 - 11 - - - - - - True - True - True - - - 3 - 0 - - - - - - True - True - True - - - 3 - 1 - - - - - - True - True - True - - - 3 - 2 - - - - - - True - True - True - - - 3 - 3 - - - - - - True - True - True - - - 3 - 4 - - - - - - True - True - True - - - 3 - 5 - - - - - - True - True - True - - - 3 - 6 - - - - - - True - True - True - - - 3 - 7 - - - - - - True - True - True - - - 3 - 8 - - - - - - True - True - True - - - 3 - 9 - - - - - - True - True - True - - - 3 - 10 - - - - - - True - True - True - - - 3 - 11 - - + The primary controller's type + center + 5 + 5 + Controller Type: False True - 10 + 0 + + + + + True + False + The primary controller's type + 5 + 0 + + Handheld + Pro Controller + Paired Joycons + Left Joycon + Right Joycon + + + + True + True 1 + + True + True + 10 + 0 + + + + + True + False + 2 + 5 + + + True + False + LStick Up + + + 0 + 0 + + + + + True + False + LStick Down + + + 0 + 1 + + + + + True + False + LStick Left + + + 0 + 2 + + + + + True + False + LStick Right + + + 0 + 3 + + + + + True + False + LStick Button + + + 0 + 4 + + + + + True + False + Dpad Up + + + 0 + 5 + + + + + True + False + Dpad Down + + + 0 + 6 + + + + + True + False + Dpad Left + + + 0 + 7 + + + + + True + False + Dpad Right + + + 0 + 8 + + + + + True + False + - + + + 0 + 9 + + + + + True + False + L + + + 0 + 10 + + + + + True + False + ZL + + + 0 + 11 + + + + + True + False + ZR + + + 2 + 11 + + + + + True + False + R + + + 2 + 10 + + + + + True + False + + + + + 2 + 9 + + + + + True + False + Y + + + 2 + 8 + + + + + True + False + X + + + 2 + 7 + + + + + True + False + B + + + 2 + 6 + + + + + True + False + A + + + 2 + 5 + + + + + True + False + RStick Button + + + 2 + 4 + + + + + True + False + RStick Right + + + 2 + 3 + + + + + True + False + RStick Left + + + 2 + 2 + + + + + True + False + RStick Down + + + 2 + 1 + + + + + True + False + RStick Up + + + 2 + 0 + + + + + + True + True + True + + + 1 + 0 + + + + + + True + True + True + + + 1 + 1 + + + + + + True + True + True + + + 1 + 2 + + + + + + True + True + True + + + 1 + 3 + + + + + + True + True + True + + + 1 + 4 + + + + + + True + True + True + + + 1 + 5 + + + + + + True + True + True + + + 1 + 6 + + + + + + True + True + True + + + 1 + 7 + + + + + + True + True + True + + + 1 + 8 + + + + + + True + True + True + + + 1 + 9 + + + + + + True + True + True + + + 1 + 10 + + + + + + True + True + True + + + 1 + 11 + + + + + + True + True + True + + + 3 + 0 + + + + + + True + True + True + + + 3 + 1 + + + + + + True + True + True + + + 3 + 2 + + + + + + True + True + True + + + 3 + 3 + + + + + + True + True + True + + + 3 + 4 + + + + + + True + True + True + + + 3 + 5 + + + + + + True + True + True + + + 3 + 6 + + + + + + True + True + True + + + 3 + 7 + + + + + + True + True + True + + + 3 + 8 + + + + + + True + True + True + + + 3 + 9 + + + + + + True + True + True + + + 3 + 10 + + + + + + True + True + True + + + 3 + 11 + + + False True - 0 - - - - - True - False - 5 - - - True - True + 10 1 - - - - True - False - Controller 1 - - False + False + True + 0 - + True False - Multiple controllers are not yet supported + True + True 1 - True - - - - - True - False - Controller 2 - - - 1 - False - - - - - True - False - Multiple controllers are not yet supported - - - 2 - - - - - True - False - Controller 3 - - - 2 - False - - - - - True - False - Multiple controllers are not yet supported - - - 3 - - - - - True - False - Controller 4 - - - 3 - False - - - - - True - False - Multiple controllers are not yet supported - - - 4 - - - - - True - False - Controller 5 - - - 4 - False - - - - - True - False - Multiple controllers are not yet supported - - - 5 - - - - - True - False - Controller 6 - - - 5 - False - - - - - True - False - Multiple controllers are not yet supported - - - 6 - - - - - True - False - Controller 7 - - - 6 - False - - - - - True - False - Multiple controllers are not yet supported - - - 7 - - - - - True - False - Controller 8 - - - 7 - False diff --git a/Ryujinx/Ui/assets/BlueCon.png b/Ryujinx/Ui/assets/BlueCon.png index f442b185b4..25691957eb 100644 Binary files a/Ryujinx/Ui/assets/BlueCon.png and b/Ryujinx/Ui/assets/BlueCon.png differ diff --git a/Ryujinx/Ui/assets/DiscordLogo.png b/Ryujinx/Ui/assets/DiscordLogo.png index 85c46fd8d3..f3486b99c9 100644 Binary files a/Ryujinx/Ui/assets/DiscordLogo.png and b/Ryujinx/Ui/assets/DiscordLogo.png differ diff --git a/Ryujinx/Ui/assets/GitHubLogo.png b/Ryujinx/Ui/assets/GitHubLogo.png index 192846a120..2e860709ed 100644 Binary files a/Ryujinx/Ui/assets/GitHubLogo.png and b/Ryujinx/Ui/assets/GitHubLogo.png differ diff --git a/Ryujinx/Ui/assets/JoyCon.png b/Ryujinx/Ui/assets/JoyCon.png index ec8a8f993c..ec74586376 100644 Binary files a/Ryujinx/Ui/assets/JoyCon.png and b/Ryujinx/Ui/assets/JoyCon.png differ diff --git a/Ryujinx/Ui/assets/PatreonLogo.png b/Ryujinx/Ui/assets/PatreonLogo.png index 5b35572af6..19c7ffbc6b 100644 Binary files a/Ryujinx/Ui/assets/PatreonLogo.png and b/Ryujinx/Ui/assets/PatreonLogo.png differ diff --git a/Ryujinx/Ui/assets/RedCon.png b/Ryujinx/Ui/assets/RedCon.png index 59d3c013dc..6094b2e812 100644 Binary files a/Ryujinx/Ui/assets/RedCon.png and b/Ryujinx/Ui/assets/RedCon.png differ diff --git a/Ryujinx/Ui/assets/TwitterLogo.png b/Ryujinx/Ui/assets/TwitterLogo.png index a2030bc6e5..3d01efc091 100644 Binary files a/Ryujinx/Ui/assets/TwitterLogo.png and b/Ryujinx/Ui/assets/TwitterLogo.png differ