Misc fixes
|
@ -28,17 +28,17 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
public struct ApplicationData
|
public struct ApplicationData
|
||||||
{
|
{
|
||||||
public bool Fav { get; set; }
|
public bool Favorite { get; set; }
|
||||||
public byte[] Icon { get; set; }
|
public byte[] Icon { get; set; }
|
||||||
public string TitleName { get; set; }
|
public string TitleName { get; set; }
|
||||||
public string TitleId { get; set; }
|
public string TitleId { get; set; }
|
||||||
public string Developer { get; set; }
|
public string Developer { get; set; }
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
public string TimePlayed { get; set; }
|
public string TimePlayed { get; set; }
|
||||||
public string LastPlayed { get; set; }
|
public string LastPlayed { get; set; }
|
||||||
public string FileExt { get; set; }
|
public string FileExtension { get; set; }
|
||||||
public string FileSize { get; set; }
|
public string FileSize { get; set; }
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ApplicationData> ApplicationLibraryData { get; private set; }
|
public static List<ApplicationData> ApplicationLibraryData { get; private set; }
|
||||||
|
@ -52,7 +52,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
private struct ApplicationMetadata
|
private struct ApplicationMetadata
|
||||||
{
|
{
|
||||||
public bool Fav { get; set; }
|
public bool Favorite { get; set; }
|
||||||
public double TimePlayed { get; set; }
|
public double TimePlayed { get; set; }
|
||||||
public string LastPlayed { get; set; }
|
public string LastPlayed { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -339,17 +339,17 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
ApplicationData data = new ApplicationData()
|
ApplicationData data = new ApplicationData()
|
||||||
{
|
{
|
||||||
Fav = metaData.Item1,
|
Favorite = metaData.Item1,
|
||||||
Icon = applicationIcon,
|
Icon = applicationIcon,
|
||||||
TitleName = titleName,
|
TitleName = titleName,
|
||||||
TitleId = titleId,
|
TitleId = titleId,
|
||||||
Developer = developer,
|
Developer = developer,
|
||||||
Version = version,
|
Version = version,
|
||||||
TimePlayed = metaData.Item2,
|
TimePlayed = metaData.Item2,
|
||||||
LastPlayed = metaData.Item3,
|
LastPlayed = metaData.Item3,
|
||||||
FileExt = Path.GetExtension(applicationPath).ToUpper().Remove(0 ,1),
|
FileExtension = Path.GetExtension(applicationPath).ToUpper().Remove(0 ,1),
|
||||||
FileSize = (filesize < 1) ? (filesize * 1024).ToString("0.##") + "MB" : filesize.ToString("0.##") + "GB",
|
FileSize = (filesize < 1) ? (filesize * 1024).ToString("0.##") + "MB" : filesize.ToString("0.##") + "GB",
|
||||||
Path = applicationPath,
|
Path = applicationPath,
|
||||||
};
|
};
|
||||||
|
|
||||||
ApplicationLibraryData.Add(data);
|
ApplicationLibraryData.Add(data);
|
||||||
|
@ -413,7 +413,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
AppMetadata = new ApplicationMetadata
|
AppMetadata = new ApplicationMetadata
|
||||||
{
|
{
|
||||||
Fav = false,
|
Favorite = false,
|
||||||
TimePlayed = 0,
|
TimePlayed = 0,
|
||||||
LastPlayed = "Never"
|
LastPlayed = "Never"
|
||||||
};
|
};
|
||||||
|
@ -446,7 +446,7 @@ namespace Ryujinx.UI
|
||||||
timePlayed = $"{Math.Round(AppMetadata.TimePlayed / SecondsPerDay, 2, MidpointRounding.AwayFromZero)} days";
|
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)
|
private static byte[] NspOrXciIcon(string applicationPath)
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
private struct ApplicationMetadata
|
private struct ApplicationMetadata
|
||||||
{
|
{
|
||||||
public bool Fav { get; set; }
|
public bool Favorite { get; set; }
|
||||||
public double TimePlayed { get; set; }
|
public double TimePlayed { get; set; }
|
||||||
public string LastPlayed { 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)
|
private MainWindow(Builder builder, string[] args, Application gtkApplication) : base(builder.GetObject("_mainWin").Handle)
|
||||||
{
|
{
|
||||||
|
builder.Autoconnect(this);
|
||||||
|
|
||||||
|
DeleteEvent += Window_Close;
|
||||||
|
|
||||||
_renderer = new OglRenderer();
|
_renderer = new OglRenderer();
|
||||||
|
|
||||||
_audioOut = InitializeAudioEngine();
|
_audioOut = InitializeAudioEngine();
|
||||||
|
|
||||||
_device = new HLE.Switch(_renderer, _audioOut);
|
_device = new HLE.Switch(_renderer, _audioOut);
|
||||||
|
|
||||||
|
_gtkApplication = gtkApplication;
|
||||||
|
|
||||||
Configuration.Load(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
|
Configuration.Load(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
|
||||||
Configuration.InitialConfigure(_device);
|
Configuration.InitialConfigure(_device);
|
||||||
|
|
||||||
ApplicationLibrary.Init(SwitchSettings.SwitchConfig.GameDirs, _device.System.KeySet, _device.System.State.DesiredTitleLanguage);
|
ApplicationLibrary.Init(SwitchSettings.SwitchConfig.GameDirs, _device.System.KeySet, _device.System.State.DesiredTitleLanguage);
|
||||||
|
|
||||||
_gtkApplication = gtkApplication;
|
|
||||||
|
|
||||||
ApplyTheme();
|
ApplyTheme();
|
||||||
|
|
||||||
if (DiscordIntegrationEnabled)
|
if (DiscordIntegrationEnabled)
|
||||||
|
@ -115,10 +119,6 @@ namespace Ryujinx.UI
|
||||||
DiscordClient.SetPresence(DiscordPresence);
|
DiscordClient.SetPresence(DiscordPresence);
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.Autoconnect(this);
|
|
||||||
|
|
||||||
DeleteEvent += Window_Close;
|
|
||||||
|
|
||||||
_mainWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
|
_mainWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
|
||||||
_stopEmulation.Sensitive = false;
|
_stopEmulation.Sensitive = false;
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
foreach (ApplicationLibrary.ApplicationData AppData in ApplicationLibrary.ApplicationLibraryData)
|
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);
|
_tableStore.SetSortFunc(5, TimePlayedSort);
|
||||||
|
@ -353,7 +353,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
AppMetadata = new ApplicationMetadata
|
AppMetadata = new ApplicationMetadata
|
||||||
{
|
{
|
||||||
Fav = false,
|
Favorite = false,
|
||||||
TimePlayed = 0,
|
TimePlayed = 0,
|
||||||
LastPlayed = "Never"
|
LastPlayed = "Never"
|
||||||
};
|
};
|
||||||
|
@ -406,7 +406,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
AppMetadata = new ApplicationMetadata
|
AppMetadata = new ApplicationMetadata
|
||||||
{
|
{
|
||||||
Fav = false,
|
Favorite = false,
|
||||||
TimePlayed = 0,
|
TimePlayed = 0,
|
||||||
LastPlayed = "Never"
|
LastPlayed = "Never"
|
||||||
};
|
};
|
||||||
|
@ -474,13 +474,13 @@ namespace Ryujinx.UI
|
||||||
{
|
{
|
||||||
_tableStore.SetValue(treeIter, 0, false);
|
_tableStore.SetValue(treeIter, 0, false);
|
||||||
|
|
||||||
AppMetadata.Fav = false;
|
AppMetadata.Favorite = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_tableStore.SetValue(treeIter, 0, true);
|
_tableStore.SetValue(treeIter, 0, true);
|
||||||
|
|
||||||
AppMetadata.Fav = true;
|
AppMetadata.Favorite = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] saveData = JsonSerializer.Serialize(AppMetadata, resolver);
|
byte[] saveData = JsonSerializer.Serialize(AppMetadata, resolver);
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
<object class="GtkMenuItem" id="GUIColumns">
|
<object class="GtkMenuItem" id="GUIColumns">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="tooltip_text" translatable="yes">Select which GUI columns to enable (restart Ryujinx for these changes to take effect)</property>
|
<property name="tooltip_text" translatable="yes">Select which GUI columns to enable</property>
|
||||||
<property name="label" translatable="yes">Enable GUI Columns</property>
|
<property name="label" translatable="yes">Enable GUI Columns</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<child type="submenu">
|
<child type="submenu">
|
||||||
|
|
|
@ -86,10 +86,10 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
private SwitchSettings(Builder builder, HLE.Switch device) : base(builder.GetObject("_settingsWin").Handle)
|
private SwitchSettings(Builder builder, HLE.Switch device) : base(builder.GetObject("_settingsWin").Handle)
|
||||||
{
|
{
|
||||||
Device = device;
|
|
||||||
|
|
||||||
builder.Autoconnect(this);
|
builder.Autoconnect(this);
|
||||||
|
|
||||||
|
Device = device;
|
||||||
|
|
||||||
_settingsWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
|
_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);
|
_controller1Image.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.JoyCon.png", 500, 500);
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 282 KiB After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 16 KiB |