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
|
||||||
{
|
{
|
||||||
|
@ -262,9 +264,11 @@ 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";
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -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))
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue