updated nuget package with missing dlls and changed emmauss' requested changes
This commit is contained in:
parent
e42b68977f
commit
d0ff8f44ae
6 changed files with 37 additions and 45 deletions
|
@ -9,12 +9,12 @@ using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Ryujinx
|
namespace Ryujinx.HLE
|
||||||
{
|
{
|
||||||
public class ApplicationLibrary
|
public class ApplicationLibrary
|
||||||
{
|
{
|
||||||
private static Keyset KeySet;
|
private static Keyset KeySet;
|
||||||
private static HLE.HOS.SystemState.TitleLanguage DesiredTitleLanguage;
|
private static HOS.SystemState.TitleLanguage DesiredTitleLanguage;
|
||||||
|
|
||||||
public static byte[] RyujinxNspIcon { get; private set; }
|
public static byte[] RyujinxNspIcon { get; private set; }
|
||||||
public static byte[] RyujinxXciIcon { get; private set; }
|
public static byte[] RyujinxXciIcon { get; private set; }
|
||||||
|
@ -38,7 +38,7 @@ namespace Ryujinx
|
||||||
public string Path;
|
public string Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Init(List<string> AppDirs, Keyset keySet, HLE.HOS.SystemState.TitleLanguage desiredTitleLanguage)
|
public static void Init(List<string> AppDirs, Keyset keySet, HOS.SystemState.TitleLanguage desiredTitleLanguage)
|
||||||
{
|
{
|
||||||
KeySet = keySet;
|
KeySet = keySet;
|
||||||
DesiredTitleLanguage = desiredTitleLanguage;
|
DesiredTitleLanguage = desiredTitleLanguage;
|
||||||
|
@ -104,7 +104,9 @@ namespace Ryujinx
|
||||||
|
|
||||||
using (FileStream file = new FileStream(applicationPath, FileMode.Open, FileAccess.Read))
|
using (FileStream file = new FileStream(applicationPath, FileMode.Open, FileAccess.Read))
|
||||||
{
|
{
|
||||||
if ((Path.GetExtension(applicationPath) == ".nsp") || (Path.GetExtension(applicationPath) == ".pfs0") || (Path.GetExtension(applicationPath) == ".xci"))
|
if ((Path.GetExtension(applicationPath) == ".nsp") ||
|
||||||
|
(Path.GetExtension(applicationPath) == ".pfs0") ||
|
||||||
|
(Path.GetExtension(applicationPath) == ".xci"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -120,7 +122,7 @@ namespace Ryujinx
|
||||||
|
|
||||||
// Creates NACP class from the NACP file
|
// Creates NACP class from the NACP file
|
||||||
IFile controlNacp = controlFs.OpenFile("/control.nacp", OpenMode.Read);
|
IFile controlNacp = controlFs.OpenFile("/control.nacp", OpenMode.Read);
|
||||||
Nacp controlData = new Nacp(controlNacp.AsStream());
|
Nacp controlData = new Nacp(controlNacp.AsStream());
|
||||||
|
|
||||||
// Get the title name, title ID, developer name and version number from the NACP
|
// Get the title name, title ID, developer name and version number from the NACP
|
||||||
version = controlData.DisplayVersion;
|
version = controlData.DisplayVersion;
|
||||||
|
@ -262,13 +264,15 @@ namespace Ryujinx
|
||||||
if (Path.GetExtension(applicationPath) == ".nca") { applicationIcon = RyujinxNcaIcon; }
|
if (Path.GetExtension(applicationPath) == ".nca") { applicationIcon = RyujinxNcaIcon; }
|
||||||
else if (Path.GetExtension(applicationPath) == ".nso") { applicationIcon = RyujinxNsoIcon; }
|
else if (Path.GetExtension(applicationPath) == ".nso") { applicationIcon = RyujinxNsoIcon; }
|
||||||
|
|
||||||
|
string fileName = Path.GetFileName(applicationPath);
|
||||||
|
string fileExt = Path.GetExtension(applicationPath);
|
||||||
StringBuilder titlename = new StringBuilder();
|
StringBuilder titlename = new StringBuilder();
|
||||||
titlename.Append(Path.GetFileName(applicationPath));
|
titlename.Append(fileName);
|
||||||
titlename.Remove(Path.GetFileName(applicationPath).Length - Path.GetExtension(applicationPath).Length, Path.GetExtension(applicationPath).Length);
|
titlename.Remove(fileName.Length - fileExt.Length, fileExt.Length);
|
||||||
|
|
||||||
titleName = titlename.ToString();
|
titleName = titlename.ToString();
|
||||||
titleId = "0000000000000000";
|
titleId = "0000000000000000";
|
||||||
version = "?";
|
version = "?";
|
||||||
developer = "Unknown";
|
developer = "Unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -453,7 +453,7 @@ namespace Ryujinx.HLE.HOS
|
||||||
Nacp controlData = new Nacp(controlFile.AsStream());
|
Nacp controlData = new Nacp(controlFile.AsStream());
|
||||||
|
|
||||||
TitleName = CurrentTitle = controlData.Descriptions[(int)State.DesiredTitleLanguage].Title;
|
TitleName = CurrentTitle = controlData.Descriptions[(int)State.DesiredTitleLanguage].Title;
|
||||||
TitleID = metaData.Aci0.TitleId.ToString("x16");
|
TitleID = metaData.Aci0.TitleId.ToString("x16");
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(CurrentTitle))
|
if (string.IsNullOrWhiteSpace(CurrentTitle))
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Ryujinx
|
||||||
Application.Init();
|
Application.Init();
|
||||||
|
|
||||||
Application gtkapp = new Application("Ryujinx.Ryujinx", GLib.ApplicationFlags.None);
|
Application gtkapp = new Application("Ryujinx.Ryujinx", GLib.ApplicationFlags.None);
|
||||||
MainWindow win = new MainWindow(args, gtkapp);
|
MainWindow win = new MainWindow(args, gtkapp);
|
||||||
|
|
||||||
gtkapp.Register(GLib.Cancellable.Current);
|
gtkapp.Register(GLib.Cancellable.Current);
|
||||||
gtkapp.AddWindow(win);
|
gtkapp.AddWindow(win);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DiscordRichPresence" Version="1.0.108" />
|
<PackageReference Include="DiscordRichPresence" Version="1.0.108" />
|
||||||
<PackageReference Include="GtkSharp" Version="3.22.24.37" />
|
<PackageReference Include="GtkSharp" Version="3.22.24.37" />
|
||||||
<PackageReference Include="GtkSharp.Dependencies" Version="1.0.0" />
|
<PackageReference Include="GtkSharp.Dependencies" Version="1.0.1" />
|
||||||
<PackageReference Include="JsonPrettyPrinter" Version="1.0.1.1" />
|
<PackageReference Include="JsonPrettyPrinter" Version="1.0.1.1" />
|
||||||
<PackageReference Include="OpenTK.NetStandard" Version="1.0.4" />
|
<PackageReference Include="OpenTK.NetStandard" Version="1.0.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -5,6 +5,7 @@ using Ryujinx.Audio;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Graphics.Gal;
|
using Ryujinx.Graphics.Gal;
|
||||||
using Ryujinx.Graphics.Gal.OpenGL;
|
using Ryujinx.Graphics.Gal.OpenGL;
|
||||||
|
using Ryujinx.HLE;
|
||||||
using Ryujinx.Profiler;
|
using Ryujinx.Profiler;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -55,7 +56,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
_audioOut = InitializeAudioEngine();
|
_audioOut = InitializeAudioEngine();
|
||||||
|
|
||||||
_device = new HLE.Switch(_renderer, _audioOut);
|
_device = new HLE.Switch(_renderer, _audioOut);
|
||||||
|
|
||||||
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);
|
||||||
|
@ -92,9 +93,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
if (args.Length == 1)
|
if (args.Length == 1)
|
||||||
{
|
{
|
||||||
//Box.Remove(GameTableWindow);
|
// Temporary code section start, remove this section when game is rendered to the GLArea in the GUI
|
||||||
|
|
||||||
//Temporary code section start, remove this section and uncomment above line when game is rendered to the glarea in the gui
|
|
||||||
Box.Remove(GlScreen);
|
Box.Remove(GlScreen);
|
||||||
Nfc.Sensitive = false;
|
Nfc.Sensitive = false;
|
||||||
ReturnMain.Sensitive = false;
|
ReturnMain.Sensitive = false;
|
||||||
|
@ -110,7 +109,7 @@ namespace Ryujinx.UI
|
||||||
_TableStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), 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;
|
GameTable.Model = _TableStore;
|
||||||
UpdateGameTable();
|
UpdateGameTable();
|
||||||
//Temporary code section end
|
// Temporary code section end
|
||||||
|
|
||||||
LoadApplication(args[0]);
|
LoadApplication(args[0]);
|
||||||
}
|
}
|
||||||
|
@ -182,15 +181,14 @@ namespace Ryujinx.UI
|
||||||
{
|
{
|
||||||
if (_GameLoaded)
|
if (_GameLoaded)
|
||||||
{
|
{
|
||||||
MessageDialog eRrOr = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "A game has already been loaded. Please close the emulator and try again");
|
MessageDialog errorDialog = 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);
|
errorDialog.SetSizeRequest(100, 20);
|
||||||
eRrOr.Title = "Ryujinx - Error";
|
errorDialog.Title = "Ryujinx - Error";
|
||||||
eRrOr.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
|
errorDialog.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
|
||||||
eRrOr.WindowPosition = WindowPosition.Center;
|
errorDialog.WindowPosition = WindowPosition.Center;
|
||||||
eRrOr.Run();
|
errorDialog.Run();
|
||||||
eRrOr.Destroy();
|
errorDialog.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Directory.Exists(path))
|
if (Directory.Exists(path))
|
||||||
|
@ -310,7 +308,7 @@ namespace Ryujinx.UI
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string appdataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
string appdataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||||
string savePath = System.IO.Path.Combine(appdataPath, "RyuFs", "nand", "user", "save", "0000000000000000", userId, _device.System.TitleID);
|
string savePath = System.IO.Path.Combine(appdataPath, "RyuFs", "nand", "user", "save", "0000000000000000", userId, _device.System.TitleID);
|
||||||
double currentPlayTime = 0;
|
double currentPlayTime = 0;
|
||||||
|
|
||||||
using (FileStream fs = File.OpenRead(System.IO.Path.Combine(savePath, "LastPlayed.dat")))
|
using (FileStream fs = File.OpenRead(System.IO.Path.Combine(savePath, "LastPlayed.dat")))
|
||||||
|
@ -357,27 +355,22 @@ namespace Ryujinx.UI
|
||||||
string path = (string)_TableStore.GetValue(treeiter, 8);
|
string path = (string)_TableStore.GetValue(treeiter, 8);
|
||||||
|
|
||||||
LoadApplication(path);
|
LoadApplication(path);
|
||||||
|
|
||||||
//Box.Remove(GameTableWindow);
|
|
||||||
//Box.Add(GlScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Load_Application_File(object o, EventArgs args)
|
private void Load_Application_File(object o, EventArgs args)
|
||||||
{
|
{
|
||||||
FileChooserDialog fc = new FileChooserDialog("Choose the file to open", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept);
|
FileChooserDialog fc = new FileChooserDialog("Choose the file to open", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept);
|
||||||
fc.Filter = new FileFilter();
|
fc.Filter = new FileFilter();
|
||||||
fc.Filter.AddPattern("*.nsp");
|
fc.Filter.AddPattern("*.nsp" );
|
||||||
fc.Filter.AddPattern("*.xci");
|
fc.Filter.AddPattern("*.pfs0");
|
||||||
fc.Filter.AddPattern("*.nca");
|
fc.Filter.AddPattern("*.xci" );
|
||||||
fc.Filter.AddPattern("*.nro");
|
fc.Filter.AddPattern("*.nca" );
|
||||||
fc.Filter.AddPattern("*.nso");
|
fc.Filter.AddPattern("*.nro" );
|
||||||
|
fc.Filter.AddPattern("*.nso" );
|
||||||
|
|
||||||
if (fc.Run() == (int)ResponseType.Accept)
|
if (fc.Run() == (int)ResponseType.Accept)
|
||||||
{
|
{
|
||||||
LoadApplication(fc.Filename);
|
LoadApplication(fc.Filename);
|
||||||
|
|
||||||
//Box.Remove(GameTableWindow);
|
|
||||||
//Box.Add(GlScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fc.Destroy();
|
fc.Destroy();
|
||||||
|
@ -390,9 +383,6 @@ namespace Ryujinx.UI
|
||||||
if (fc.Run() == (int)ResponseType.Accept)
|
if (fc.Run() == (int)ResponseType.Accept)
|
||||||
{
|
{
|
||||||
LoadApplication(fc.Filename);
|
LoadApplication(fc.Filename);
|
||||||
|
|
||||||
//Box.Remove(GameTableWindow);
|
|
||||||
//Box.Add(GlScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fc.Destroy();
|
fc.Destroy();
|
||||||
|
@ -414,9 +404,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
private void ReturnMain_Pressed(object o, EventArgs args)
|
private void ReturnMain_Pressed(object o, EventArgs args)
|
||||||
{
|
{
|
||||||
Box.Remove(GlScreen);
|
//TODO: Write logic to kill running game
|
||||||
Box.Add(GameTableWindow);
|
|
||||||
//will also have to write logic to kill running game
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FullScreen_Toggled(object o, EventArgs args)
|
private void FullScreen_Toggled(object o, EventArgs args)
|
||||||
|
@ -441,7 +429,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
if (fc.Run() == (int)ResponseType.Accept)
|
if (fc.Run() == (int)ResponseType.Accept)
|
||||||
{
|
{
|
||||||
//Soon™
|
//TODO: Write logic to emulate reading an NFC tag
|
||||||
}
|
}
|
||||||
fc.Destroy();
|
fc.Destroy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ namespace Ryujinx.UI
|
||||||
|
|
||||||
GameDirsBox.AppendColumn("", new CellRendererText(), "text", 0);
|
GameDirsBox.AppendColumn("", new CellRendererText(), "text", 0);
|
||||||
_GameDirsBoxStore = new ListStore(typeof(string));
|
_GameDirsBoxStore = new ListStore(typeof(string));
|
||||||
GameDirsBox.Model = _GameDirsBoxStore;
|
GameDirsBox.Model = _GameDirsBoxStore;
|
||||||
foreach (string GameDir in SwitchConfig.GameDirs)
|
foreach (string GameDir in SwitchConfig.GameDirs)
|
||||||
{
|
{
|
||||||
_GameDirsBoxStore.AppendValues(GameDir);
|
_GameDirsBoxStore.AppendValues(GameDir);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue