diff --git a/Ryujinx.HLE/ApplicationLibrary.cs b/Ryujinx.HLE/ApplicationLibrary.cs
index 9785371d1c..61880d8f5b 100644
--- a/Ryujinx.HLE/ApplicationLibrary.cs
+++ b/Ryujinx.HLE/ApplicationLibrary.cs
@@ -33,6 +33,7 @@ namespace Ryujinx
public string Version;
public string TimePlayed;
public string LastPlayed;
+ public string FileExt;
public string FileSize;
public string Path;
}
@@ -105,54 +106,45 @@ namespace Ryujinx
{
if ((Path.GetExtension(applicationPath) == ".nsp") || (Path.GetExtension(applicationPath) == ".pfs0") || (Path.GetExtension(applicationPath) == ".xci"))
{
- IFileSystem controlFs = null;
-
- // Store the ControlFS in variable called controlFs
- if (Path.GetExtension(applicationPath) == ".xci")
- {
- Xci xci = new Xci(KeySet, file.AsStorage());
- controlFs = GetControlFs(xci.OpenPartition(XciPartitionType.Secure));
- }
- else { controlFs = GetControlFs(new PartitionFileSystem(file.AsStorage())); }
-
- // Creates NACP class from the NACP file
- IFile controlFile = controlFs.OpenFile("/control.nacp", OpenMode.Read);
- Nacp controlData = new Nacp(controlFile.AsStream());
-
- // 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))
- {
- titleName = controlData.Descriptions.ToList().Find(x => !string.IsNullOrWhiteSpace(x.Title)).Title;
- }
-
- titleId = controlData.PresenceGroupId.ToString("x16");
- 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;
- }
-
- // Read the icon from the ControlFS and store it as a byte array
try
{
- IFile icon = controlFs.OpenFile($"/icon_{DesiredTitleLanguage}.dat", OpenMode.Read);
- using (MemoryStream ms = new MemoryStream())
+ IFileSystem controlFs = null;
+
+ // Store the ControlFS in variable called controlFs
+ if (Path.GetExtension(applicationPath) == ".xci")
{
- icon.AsStream().CopyTo(ms);
- applicationIcon = ms.ToArray();
+ Xci xci = new Xci(KeySet, file.AsStorage());
+ controlFs = GetControlFs(xci.OpenPartition(XciPartitionType.Secure));
}
- }
- catch (FileNotFoundException)
- {
+ else { controlFs = GetControlFs(new PartitionFileSystem(file.AsStorage())); }
+
+ // Creates NACP class from the NACP file
+ IFile controlNacp = controlFs.OpenFile("/control.nacp", OpenMode.Read);
+ Nacp controlData = new Nacp(controlNacp.AsStream());
+
+ // 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))
+ {
+ titleName = controlData.Descriptions.ToList().Find(x => !string.IsNullOrWhiteSpace(x.Title)).Title;
+ }
+
+ titleId = controlData.PresenceGroupId.ToString("x16");
+ 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;
+ }
+
+ // Read the icon from the ControlFS and store it as a byte array
try
{
- IFile icon = controlFs.OpenFile($"/icon_AmericanEnglish.dat", OpenMode.Read);
+ IFile icon = controlFs.OpenFile($"/icon_{DesiredTitleLanguage}.dat", OpenMode.Read);
using (MemoryStream ms = new MemoryStream())
{
icon.AsStream().CopyTo(ms);
@@ -161,10 +153,52 @@ namespace Ryujinx
}
catch (FileNotFoundException)
{
- if (Path.GetExtension(applicationPath) == ".xci") { applicationIcon = RyujinxXciIcon; }
- else { applicationIcon = RyujinxNspIcon; }
+ IDirectory controlDir = controlFs.OpenDirectory("./", OpenDirectoryMode.All);
+ foreach (DirectoryEntry entry in controlDir.Read())
+ {
+ if (entry.Name == "control.nacp") { continue; }
+
+ IFile icon = controlFs.OpenFile(entry.FullPath, OpenMode.Read);
+ using (MemoryStream ms = new MemoryStream())
+ {
+ icon.AsStream().CopyTo(ms);
+ applicationIcon = ms.ToArray();
+ }
+
+ if (applicationIcon != null) { break; }
+ }
+
+ if (applicationIcon == null)
+ {
+ if (Path.GetExtension(applicationPath) == ".xci") { applicationIcon = RyujinxXciIcon; }
+ else { applicationIcon = RyujinxNspIcon; }
+ }
}
}
+ catch (MissingKeyException exception)
+ {
+ titleName = "Unknown";
+ titleId = "Unknown";
+ developer = "Unknown";
+ version = "?";
+
+ if (Path.GetExtension(applicationPath) == ".xci") { applicationIcon = RyujinxXciIcon; }
+ else { applicationIcon = RyujinxNspIcon; }
+
+ Logger.PrintError(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}");
+ }
+ catch (InvalidDataException)
+ {
+ titleName = "Unknown";
+ titleId = "Unknown";
+ developer = "Unknown";
+ version = "?";
+
+ if (Path.GetExtension(applicationPath) == ".xci") { applicationIcon = RyujinxXciIcon; }
+ else { applicationIcon = RyujinxNspIcon; }
+
+ Logger.PrintError(LogClass.Application, $"Unable to decrypt NCA header. The header key must be incorrect. File: {applicationPath}");
+ }
}
else if (Path.GetExtension(applicationPath) == ".nro")
@@ -250,6 +284,7 @@ namespace Ryujinx
Version = version,
TimePlayed = playedData[0],
LastPlayed = playedData[1],
+ FileExt = Path.GetExtension(applicationPath).ToUpper().Remove(0 ,1),
FileSize = (filesize < 1) ? (filesize * 1024).ToString("0.##") + "MB" : filesize.ToString("0.##") + "GB",
Path = applicationPath,
};
@@ -289,42 +324,46 @@ namespace Ryujinx
private static string[] GetPlayedData(string TitleId, string UserId)
{
- string[] playedData = new string[2];
- string appdataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
- string savePath = Path.Combine(appdataPath, "RyuFs", "nand", "user", "save", "0000000000000000", UserId, TitleId);
+ try
+ {
+ string[] playedData = new string[2];
+ string appdataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+ string savePath = Path.Combine(appdataPath, "RyuFs", "nand", "user", "save", "0000000000000000", UserId, TitleId);
- if (File.Exists(Path.Combine(savePath, "TimePlayed.dat")) == false)
- {
- Directory.CreateDirectory(savePath);
- using (FileStream file = File.OpenWrite(Path.Combine(savePath, "TimePlayed.dat"))) { file.Write(Encoding.ASCII.GetBytes("0")); }
- }
- using (FileStream fs = File.OpenRead(Path.Combine(savePath, "TimePlayed.dat")))
- {
- using (StreamReader sr = new StreamReader(fs))
+ if (File.Exists(Path.Combine(savePath, "TimePlayed.dat")) == false)
{
- float timePlayed = float.Parse(sr.ReadLine());
-
- if (timePlayed <= 60.0) { playedData[0] = $"{timePlayed}s"; }
- else if(timePlayed <= 3600.0) { playedData[0] = $"{Math.Round(timePlayed / 60 , 2, MidpointRounding.AwayFromZero)} mins"; }
- else if(timePlayed <= 86400.0) { playedData[0] = $"{Math.Round(timePlayed / 3600 , 2, MidpointRounding.AwayFromZero)} hrs"; }
- else { playedData[0] = $"{Math.Round(timePlayed / 86400, 2, MidpointRounding.AwayFromZero)} days"; }
+ Directory.CreateDirectory(savePath);
+ using (FileStream file = File.OpenWrite(Path.Combine(savePath, "TimePlayed.dat"))) { file.Write(Encoding.ASCII.GetBytes("0")); }
}
- }
-
- if (File.Exists(Path.Combine(savePath, "LastPlayed.dat")) == false)
- {
- Directory.CreateDirectory(savePath);
- using (FileStream file = File.OpenWrite(Path.Combine(savePath, "LastPlayed.dat"))) { file.Write(Encoding.ASCII.GetBytes("Never")); }
- }
- using (FileStream fs = File.OpenRead(Path.Combine(savePath, "LastPlayed.dat")))
- {
- using (StreamReader sr = new StreamReader(fs))
+ using (FileStream fs = File.OpenRead(Path.Combine(savePath, "TimePlayed.dat")))
{
- playedData[1] = sr.ReadLine();
- }
- }
+ using (StreamReader sr = new StreamReader(fs))
+ {
+ float timePlayed = float.Parse(sr.ReadLine());
- return playedData;
+ if (timePlayed <= 60.0) { playedData[0] = $"{timePlayed}s"; }
+ else if (timePlayed <= 3600.0) { playedData[0] = $"{Math.Round(timePlayed / 60 , 2, MidpointRounding.AwayFromZero)} mins"; }
+ else if (timePlayed <= 86400.0) { playedData[0] = $"{Math.Round(timePlayed / 3600 , 2, MidpointRounding.AwayFromZero)} hrs"; }
+ else { playedData[0] = $"{Math.Round(timePlayed / 86400, 2, MidpointRounding.AwayFromZero)} days"; }
+ }
+ }
+
+ if (File.Exists(Path.Combine(savePath, "LastPlayed.dat")) == false)
+ {
+ Directory.CreateDirectory(savePath);
+ using (FileStream file = File.OpenWrite(Path.Combine(savePath, "LastPlayed.dat"))) { file.Write(Encoding.ASCII.GetBytes("Never")); }
+ }
+ using (FileStream fs = File.OpenRead(Path.Combine(savePath, "LastPlayed.dat")))
+ {
+ using (StreamReader sr = new StreamReader(fs))
+ {
+ playedData[1] = sr.ReadLine();
+ }
+ }
+
+ return playedData;
+ }
+ catch { return new string[] { "Unknown", "Unknown" }; }
}
}
}
diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs
index 65327c9d10..21f12f95b4 100644
--- a/Ryujinx.HLE/HOS/Horizon.cs
+++ b/Ryujinx.HLE/HOS/Horizon.cs
@@ -591,11 +591,11 @@ namespace Ryujinx.HLE.HOS
staticObject = new NxStaticObject(input);
}
+ ContentManager.LoadEntries();
+
TitleName = CurrentTitle = metaData.TitleName;
TitleID = metaData.Aci0.TitleId.ToString("x16");
- ContentManager.LoadEntries();
-
ProgramLoader.LoadStaticObjects(this, metaData, new IExecutable[] { staticObject });
}
diff --git a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs
index b0ca689518..169e68daf3 100644
--- a/Ryujinx.HLE/Loaders/Npdm/Npdm.cs
+++ b/Ryujinx.HLE/Loaders/Npdm/Npdm.cs
@@ -4,8 +4,8 @@ using System.Text;
namespace Ryujinx.HLE.Loaders.Npdm
{
- // https://github.com/SciresM/hactool/blob/master/npdm.c
- // https://github.com/SciresM/hactool/blob/master/npdm.h
+ // https://github.com/SciresM/hactool/blob/master/npdm.c
+ // https://github.com/SciresM/hactool/blob/master/npdm.h
// http://switchbrew.org/index.php?title=NPDM
class Npdm
{
@@ -18,7 +18,7 @@ namespace Ryujinx.HLE.Loaders.Npdm
public int PersonalMmHeapSize { get; private set; }
public int ProcessCategory { get; private set; }
public int MainThreadStackSize { get; private set; }
- public string TitleName { get; set; }
+ public string TitleName { get; set; }
public byte[] ProductCode { get; private set; }
public Aci0 Aci0 { get; private set; }
diff --git a/Ryujinx/Config.json b/Ryujinx/Config.json
index f7ce6039c3..d6ed189adc 100644
--- a/Ryujinx/Config.json
+++ b/Ryujinx/Config.json
@@ -18,6 +18,7 @@
"enable_legacy_jit": false,
"ignore_missing_services": false,
"controller_type": "Handheld",
+ "gui_columns": [ true, true, true, true, true, true, true, true, true ],
"game_dirs": [],
"enable_custom_theme": false,
"custom_theme_path": "",
@@ -55,7 +56,7 @@
}
},
"joystick_controls": {
- "enabled": false,
+ "enabled": true,
"index": 0,
"deadzone": 0.05,
"trigger_threshold": 0.5,
diff --git a/Ryujinx/Configuration.cs b/Ryujinx/Configuration.cs
index ef9aab42b8..0297554ed0 100644
--- a/Ryujinx/Configuration.cs
+++ b/Ryujinx/Configuration.cs
@@ -60,17 +60,17 @@ namespace Ryujinx
///
/// Enables printing guest log messages
///
- public bool LoggingEnableGuest { get; private set; }
+ public bool LoggingEnableGuest { get; set; }
///
/// Enables printing FS access log messages
///
- public bool LoggingEnableFsAccessLog { get; private set; }
+ public bool LoggingEnableFsAccessLog { get; set; }
///
/// Controls which log messages are written to the log targets
///
- public LogClass[] LoggingFilteredClasses { get; private set; }
+ public LogClass[] LoggingFilteredClasses { get; set; }
///
/// Enables or disables logging to a file on disk
@@ -125,7 +125,12 @@ namespace Ryujinx
///
/// The primary controller's type
///
- public ControllerStatus ControllerType { get; private set; }
+ public ControllerStatus ControllerType { get; set; }
+
+ ///
+ /// Used to toggle columns in the GUI
+ ///
+ public List GuiColumns { get; set; }
///
/// A list of directories containing games to be used to load games into the games list
diff --git a/Ryujinx/Ui/AboutWindow.cs b/Ryujinx/Ui/AboutWindow.cs
index 65a23ba423..62b9a4e8d5 100644
--- a/Ryujinx/Ui/AboutWindow.cs
+++ b/Ryujinx/Ui/AboutWindow.cs
@@ -11,6 +11,7 @@ namespace Ryujinx.UI
{
#pragma warning disable 649
[GUI] Window AboutWin;
+ [GUI] Label VersionText;
[GUI] Image RyujinxLogo;
[GUI] Image PatreonLogo;
[GUI] Image GitHubLogo;
@@ -23,12 +24,15 @@ namespace Ryujinx.UI
private AboutWindow(Builder builder) : base(builder.GetObject("AboutWin").Handle)
{
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", 220, 220);
+ RyujinxLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.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 );
TwitterLogo.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.TwitterLogo.png", 30 , 30 );
+
+ VersionText.Text = "Version x.x.x (Commit Number)";
}
public void OpenUrl(string url)
diff --git a/Ryujinx/Ui/AboutWindow.glade b/Ryujinx/Ui/AboutWindow.glade
index d732890fcd..188a32c3d8 100644
--- a/Ryujinx/Ui/AboutWindow.glade
+++ b/Ryujinx/Ui/AboutWindow.glade
@@ -7,47 +7,18 @@
False
True
800
- 400
+ 350
dialog
-
+
-
- True
- True
- 1
-
-
-
-
- True
- False
- Ryujinx is not affiliated with Nintendo
-or any of its partners in any way
-
False
- True
- 5
+ False
+ end
2
True
- True
+ False
0
+
+
+ True
+ False
+ 10
+ 10
+
+
+ False
+ True
+ 1
+
+
True
False
+ 15
+ 10
+ 40
+ 15
vertical
True
False
start
- Ryujinx is an emulator for the Nintendo Switch.
-Please support us on Patreon.
-Get all the latest news on Twitter.
-Developers interested in contributing can find out more on our discord.
+ About
+
+
+
False
@@ -381,77 +418,148 @@ Developers interested in contributing can find out more on our discord.
-
+
True
False
- vertical
-
-
- True
- False
- start
- Created By:
-
-
- False
- True
- 5
- 0
-
-
-
-
- True
- False
- [Devs go here]
-
-
- False
- True
- 5
- 1
-
-
+ start
+ 10
+ Ryujinx is an emulator for the Nintendo Switch.
+Please support us on Patreon.
+Get all the latest news on our Twitter or Discord.
+Developers interested in contributing can find out more on our Discord.
False
True
+ 5
1
-
+
True
False
-
-
-
- True
- False
- end
- 5
- All Contributers
-
-
+ start
+ Created By:
+
+
+
False
True
+ 5
2
+
+
+ True
+ False
+ 10
+ vertical
+
+
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ False
+ top
+
+
+ True
+ False
+ start
+ gdkchan
+LDj3SNuD
+Ac_K
+Thog
+ 0
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+ »jD«
+emmaus
+Thealexbarney
+Andy A (BaronKiko)
+ 0
+
+
+ True
+ True
+ 1
+
+
+
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+
+
+
+ True
+ False
+ end
+ 5
+ All Contributors...
+
+
+
+
+
+
+
+ False
+ False
+ 2
+
+
+
+
+ True
+ True
+ 3
+
+
True
True
- 1
+ 2
True
True
- 10
1
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs
index 247ae2290d..101632aba8 100644
--- a/Ryujinx/Ui/MainWindow.cs
+++ b/Ryujinx/Ui/MainWindow.cs
@@ -96,17 +96,18 @@ namespace Ryujinx.UI
//Temporary code section start, remove this section and uncomment above line when game is rendered to the glarea in the gui
Box.Remove(GlScreen);
- Nfc.Sensitive = false;
+ Nfc.Sensitive = false;
ReturnMain.Sensitive = false;
- GameTable.AppendColumn("Icon", new CellRendererPixbuf(), "pixbuf", 0);
- GameTable.AppendColumn("Application", new CellRendererText(), "text", 1);
- GameTable.AppendColumn("Developer", new CellRendererText(), "text", 2);
- GameTable.AppendColumn("Version", new CellRendererText(), "text", 3);
- GameTable.AppendColumn("Time Played", new CellRendererText(), "text", 4);
- GameTable.AppendColumn("Last Played", new CellRendererText(), "text", 5);
- GameTable.AppendColumn("File Size", new CellRendererText(), "text", 6);
- GameTable.AppendColumn("Path", new CellRendererText(), "text", 7);
- _TableStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
+ if (SwitchSettings.SwitchConfig.GuiColumns[0]) { GameTable.AppendColumn("Icon" , new CellRendererPixbuf(), "pixbuf", 0); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[1]) { GameTable.AppendColumn("Application", new CellRendererText() , "text" , 1); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[2]) { GameTable.AppendColumn("Developer" , new CellRendererText() , "text" , 2); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[3]) { GameTable.AppendColumn("Version" , new CellRendererText() , "text" , 3); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[4]) { GameTable.AppendColumn("Time Played", new CellRendererText() , "text" , 4); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[5]) { GameTable.AppendColumn("Last Played", new CellRendererText() , "text" , 5); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[6]) { GameTable.AppendColumn("File Ext" , new CellRendererText() , "text" , 6); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[7]) { GameTable.AppendColumn("File Size" , new CellRendererText() , "text" , 7); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[8]) { GameTable.AppendColumn("Path" , new CellRendererText() , "text" , 8); }
+ _TableStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
GameTable.Model = _TableStore;
UpdateGameTable();
//Temporary code section end
@@ -120,16 +121,17 @@ namespace Ryujinx.UI
Nfc.Sensitive = false;
ReturnMain.Sensitive = false;
- GameTable.AppendColumn("Icon" , new CellRendererPixbuf(), "pixbuf", 0);
- GameTable.AppendColumn("Application", new CellRendererText() , "text" , 1);
- GameTable.AppendColumn("Developer" , new CellRendererText() , "text" , 2);
- GameTable.AppendColumn("Version" , new CellRendererText() , "text" , 3);
- GameTable.AppendColumn("Time Played", new CellRendererText() , "text" , 4);
- GameTable.AppendColumn("Last Played", new CellRendererText() , "text" , 5);
- GameTable.AppendColumn("File Size" , new CellRendererText() , "text" , 6);
- GameTable.AppendColumn("Path" , new CellRendererText() , "text" , 7);
+ if (SwitchSettings.SwitchConfig.GuiColumns[0]) { GameTable.AppendColumn("Icon" , new CellRendererPixbuf(), "pixbuf", 0); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[1]) { GameTable.AppendColumn("Application", new CellRendererText() , "text" , 1); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[2]) { GameTable.AppendColumn("Developer" , new CellRendererText() , "text" , 2); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[3]) { GameTable.AppendColumn("Version" , new CellRendererText() , "text" , 3); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[4]) { GameTable.AppendColumn("Time Played", new CellRendererText() , "text" , 4); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[5]) { GameTable.AppendColumn("Last Played", new CellRendererText() , "text" , 5); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[6]) { GameTable.AppendColumn("File Ext" , new CellRendererText() , "text" , 6); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[7]) { GameTable.AppendColumn("File Size" , new CellRendererText() , "text" , 7); }
+ if (SwitchSettings.SwitchConfig.GuiColumns[8]) { GameTable.AppendColumn("Path" , new CellRendererText() , "text" , 8); }
- _TableStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
+ _TableStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
GameTable.Model = _TableStore;
UpdateGameTable();
@@ -143,7 +145,7 @@ namespace Ryujinx.UI
foreach (ApplicationLibrary.ApplicationData AppData in ApplicationLibrary.ApplicationLibraryData)
{
- _TableStore.AppendValues(new Gdk.Pixbuf(AppData.Icon, 75, 75), $"{AppData.TitleName}\n{AppData.TitleId.ToUpper()}", AppData.Developer, AppData.Version, AppData.TimePlayed, AppData.LastPlayed, AppData.FileSize, AppData.Path);
+ _TableStore.AppendValues(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);
}
}
@@ -180,7 +182,7 @@ namespace Ryujinx.UI
{
if (_GameLoaded)
{
- MessageDialog eRrOr = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "A game has already been loaded, please unload the game and try again");
+ MessageDialog eRrOr = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "A game has already been loaded. Please close the emulator and try again");
eRrOr.SetSizeRequest(100, 20);
eRrOr.Title = "Ryujinx - Error";
eRrOr.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
@@ -352,7 +354,7 @@ namespace Ryujinx.UI
private void Row_Activated(object o, RowActivatedArgs args)
{
_TableStore.GetIter(out TreeIter treeiter, new TreePath(args.Path.ToString()));
- string path = (string)_TableStore.GetValue(treeiter, 7);
+ string path = (string)_TableStore.GetValue(treeiter, 8);
LoadApplication(path);
diff --git a/Ryujinx/Ui/SwitchSettings.cs b/Ryujinx/Ui/SwitchSettings.cs
index d3fcc6c266..f4b7077c67 100644
--- a/Ryujinx/Ui/SwitchSettings.cs
+++ b/Ryujinx/Ui/SwitchSettings.cs
@@ -23,6 +23,15 @@ namespace Ryujinx.UI
#pragma warning disable 649
[GUI] Window SettingsWin;
+ [GUI] CheckButton IconToggle;
+ [GUI] CheckButton TitleToggle;
+ [GUI] CheckButton DeveloperToggle;
+ [GUI] CheckButton VersionToggle;
+ [GUI] CheckButton TimePlayedToggle;
+ [GUI] CheckButton LastPlayedToggle;
+ [GUI] CheckButton FileExtToggle;
+ [GUI] CheckButton FileSizeToggle;
+ [GUI] CheckButton PathToggle;
[GUI] CheckButton ErrorLogToggle;
[GUI] CheckButton WarningLogToggle;
[GUI] CheckButton InfoLogToggle;
@@ -120,6 +129,16 @@ namespace Ryujinx.UI
ZR1.Clicked += (o, args) => Button_Pressed(o, args, ZR1);
//Setup Currents
+ if (SwitchConfig.GuiColumns[0]) { IconToggle.Click(); }
+ if (SwitchConfig.GuiColumns[1]) { TitleToggle.Click(); }
+ if (SwitchConfig.GuiColumns[2]) { DeveloperToggle.Click(); }
+ if (SwitchConfig.GuiColumns[3]) { VersionToggle.Click(); }
+ if (SwitchConfig.GuiColumns[4]) { TimePlayedToggle.Click(); }
+ if (SwitchConfig.GuiColumns[5]) { LastPlayedToggle.Click(); }
+ if (SwitchConfig.GuiColumns[6]) { FileExtToggle.Click(); }
+ if (SwitchConfig.GuiColumns[7]) { FileSizeToggle.Click(); }
+ if (SwitchConfig.GuiColumns[8]) { PathToggle.Click(); }
+ if (SwitchConfig.EnableFileLog) { FileLogToggle.Click(); }
if (SwitchConfig.LoggingEnableError) { ErrorLogToggle.Click(); }
if (SwitchConfig.LoggingEnableWarn) { WarningLogToggle.Click(); }
if (SwitchConfig.LoggingEnableInfo) { InfoLogToggle.Click(); }
@@ -127,7 +146,7 @@ namespace Ryujinx.UI
if (SwitchConfig.LoggingEnableDebug) { DebugLogToggle.Click(); }
if (SwitchConfig.EnableFileLog) { FileLogToggle.Click(); }
if (SwitchConfig.DockedMode) { DockedModeToggle.Click(); }
- if (SwitchConfig.EnableDiscordIntergration) { DiscordToggle.Click(); }
+ if (SwitchConfig.EnableDiscordIntegration) { DiscordToggle.Click(); }
if (SwitchConfig.EnableVsync) { VSyncToggle.Click(); }
if (SwitchConfig.EnableMulticoreScheduling) { MultiSchedToggle.Click(); }
if (SwitchConfig.EnableFsIntegrityChecks) { FSICToggle.Click(); }
@@ -272,19 +291,25 @@ namespace Ryujinx.UI
_GameDirsBoxStore.IterNext(ref iter);
}
+ if (IconToggle.Active) { SwitchConfig.GuiColumns[0] = true; }
+ if (TitleToggle.Active) { SwitchConfig.GuiColumns[1] = true; }
+ if (DeveloperToggle.Active) { SwitchConfig.GuiColumns[2] = true; }
+ if (VersionToggle.Active) { SwitchConfig.GuiColumns[3] = true; }
+ if (TimePlayedToggle.Active) { SwitchConfig.GuiColumns[4] = true; }
+ if (LastPlayedToggle.Active) { SwitchConfig.GuiColumns[5] = true; }
+ if (FileExtToggle.Active) { SwitchConfig.GuiColumns[6] = true; }
+ if (FileSizeToggle.Active) { SwitchConfig.GuiColumns[7] = true; }
+ if (PathToggle.Active) { SwitchConfig.GuiColumns[8] = true; }
if (ErrorLogToggle.Active) { SwitchConfig.LoggingEnableError = true; }
if (WarningLogToggle.Active) { SwitchConfig.LoggingEnableWarn = true; }
if (InfoLogToggle.Active) { SwitchConfig.LoggingEnableInfo = true; }
if (StubLogToggle.Active) { SwitchConfig.LoggingEnableStub = true; }
if (DebugLogToggle.Active) { SwitchConfig.LoggingEnableDebug = true; }
-<<<<<<< HEAD
-=======
if (GuestLogToggle.Active) { SwitchConfig.LoggingEnableGuest = true; }
if (FsAccessLogToggle.Active) { SwitchConfig.LoggingEnableFsAccessLog = true; }
->>>>>>> added spin button for new option and tooltips to settings
if (FileLogToggle.Active) { SwitchConfig.EnableFileLog = true; }
if (DockedModeToggle.Active) { SwitchConfig.DockedMode = true; }
- if (DiscordToggle.Active) { SwitchConfig.EnableDiscordIntergration = true; }
+ if (DiscordToggle.Active) { SwitchConfig.EnableDiscordIntegration = true; }
if (VSyncToggle.Active) { SwitchConfig.EnableVsync = true; }
if (MultiSchedToggle.Active) { SwitchConfig.EnableMulticoreScheduling = true; }
if (FSICToggle.Active) { SwitchConfig.EnableFsIntegrityChecks = true; }
@@ -293,6 +318,15 @@ namespace Ryujinx.UI
if (DirectKeyboardAccess.Active) { SwitchConfig.EnableKeyboard = true; }
if (CustThemeToggle.Active) { SwitchConfig.EnableCustomTheme = true; }
+ if (IconToggle.Active == false) { SwitchConfig.GuiColumns[0] = false; }
+ if (TitleToggle.Active == false) { SwitchConfig.GuiColumns[1] = false; }
+ if (DeveloperToggle.Active == false) { SwitchConfig.GuiColumns[2] = false; }
+ if (VersionToggle.Active == false) { SwitchConfig.GuiColumns[3] = false; }
+ if (TimePlayedToggle.Active == false) { SwitchConfig.GuiColumns[4] = false; }
+ if (LastPlayedToggle.Active == false) { SwitchConfig.GuiColumns[5] = false; }
+ if (FileExtToggle.Active == false) { SwitchConfig.GuiColumns[6] = false; }
+ if (FileSizeToggle.Active == false) { SwitchConfig.GuiColumns[7] = false; }
+ if (PathToggle.Active == false) { SwitchConfig.GuiColumns[8] = false; }
if (ErrorLogToggle.Active == false) { SwitchConfig.LoggingEnableError = false; }
if (WarningLogToggle.Active == false) { SwitchConfig.LoggingEnableWarn = false; }
if (InfoLogToggle.Active == false) { SwitchConfig.LoggingEnableInfo = false; }
@@ -300,7 +334,7 @@ namespace Ryujinx.UI
if (DebugLogToggle.Active == false) { SwitchConfig.LoggingEnableDebug = false; }
if (FileLogToggle.Active == false) { SwitchConfig.EnableFileLog = false; }
if (DockedModeToggle.Active == false) { SwitchConfig.DockedMode = false; }
- if (DiscordToggle.Active == false) { SwitchConfig.EnableDiscordIntergration = false; }
+ if (DiscordToggle.Active == false) { SwitchConfig.EnableDiscordIntegration = false; }
if (VSyncToggle.Active == false) { SwitchConfig.EnableVsync = false; }
if (MultiSchedToggle.Active == false) { SwitchConfig.EnableMulticoreScheduling = false; }
if (FSICToggle.Active == false) { SwitchConfig.EnableFsIntegrityChecks = false; }
@@ -342,7 +376,7 @@ namespace Ryujinx.UI
};
SwitchConfig.SystemLanguage = (SystemLanguage)Enum.Parse(typeof(SystemLanguage), SystemLanguageSelect.ActiveId);
- SwitchConfig.ControllerType = (HidControllerType)Enum.Parse(typeof(HidControllerType), Controller1Type.ActiveId);
+ SwitchConfig.ControllerType = (ControllerStatus)Enum.Parse(typeof(ControllerStatus), Controller1Type.ActiveId);
SwitchConfig.CustomThemePath = CustThemeDir.Buffer.Text;
SwitchConfig.GameDirs = gameDirs;
SwitchConfig.FsGlobalAccessLogMode = (int)FGALMSpinAdjustment.Value;
diff --git a/Ryujinx/Ui/SwitchSettings.glade b/Ryujinx/Ui/SwitchSettings.glade
index a812fd8f97..e583213957 100644
--- a/Ryujinx/Ui/SwitchSettings.glade
+++ b/Ryujinx/Ui/SwitchSettings.glade
@@ -103,24 +103,64 @@
-
+
True
False
- 10
- 5
- vertical
-
+
True
False
- 5
+ vertical
-
+
True
False
- Change System Language
- end
- System Language:
+
+
+ True
+ False
+ Change System Language
+ end
+ System Language:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Change System Language
+ 10
+
+ - American English
+ - British English
+ - Canadian French
+ - Chinese
+ - Dutch
+ - French
+ - German
+ - Italian
+ - Japanese
+ - Korean
+ - Latin American Spanish
+ - Portuguese
+ - Russian
+ - Simplified Chinese
+ - Spanish
+ - Taiwanese
+ - Traditional Chinese
+
+
+
+ False
+ True
+ 1
+
+
False
@@ -129,65 +169,241 @@
-
+
+ Enable Discord Integration
True
- False
- Change System Language
- 5
-
- - American English
- - British English
- - Canadian French
- - Chinese
- - Dutch
- - French
- - German
- - Italian
- - Japanese
- - Korean
- - Latin American Spanish
- - Portuguese
- - Russian
- - Simplified Chinese
- - Spanish
- - Taiwanese
- - Traditional Chinese
-
+ True
+ False
+ Enables or disables Discord Rich Presense
+ start
+ True
False
True
+ 5
1
- False
+ True
True
0
-
- Enable Discord Integration
+
True
- True
- False
- Enables or disables Discord Rich Presense
- start
- 5
- True
+ False
+
+
+ True
+ False
+ vertical
+
+
+ Enable Icon Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ Enable Developer Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ Enable Time Played Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+ Enable Title Name/ID Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ Enable Version Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ Enable Last Played Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+
+
+ Enable File Ext Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ Enable File Size Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ Enable Path Column
+ True
+ True
+ False
+ Enable or Disable aggressive CPU optimizations
+ start
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 2
+
+
- False
+ True
True
- 5
1
- False
+ True
True
1
diff --git a/Ryujinx/_schema.json b/Ryujinx/_schema.json
index 262a7058f0..b9546a84be 100644
--- a/Ryujinx/_schema.json
+++ b/Ryujinx/_schema.json
@@ -501,6 +501,13 @@
"description": "A list of directories containing games to be used to load games into the games list",
"default": []
},
+ "gui_columns": {
+ "$id": "#/properties/gui_columns",
+ "type": "bool list",
+ "title": "Used to toggle columns in the GUI",
+ "description": "Used to toggle columns in the GUI",
+ "default": [ true, true, true, true, true, true, true, true, true ]
+ },
"enable_custom_theme": {
"$id": "#/properties/enable_custom_theme",
"type": "boolean",