diff options
author | gdkchan <gab.dark.100@gmail.com> | 2018-02-04 20:08:20 -0300 |
---|---|---|
committer | gdkchan <gab.dark.100@gmail.com> | 2018-02-04 20:08:20 -0300 |
commit | b7e1d9930db6d80fcb1f7c5c6b0aa627e42e6595 (patch) | |
tree | 8bee5d98f80eadaa141ece34c9d92621ed2b6806 /Program.cs |
aloha
Diffstat (limited to 'Program.cs')
-rw-r--r-- | Program.cs | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Program.cs b/Program.cs new file mode 100644 index 00000000..44dc67c1 --- /dev/null +++ b/Program.cs @@ -0,0 +1,57 @@ +using Gal; +using Gal.OpenGL; +using System; +using System.IO; + +namespace Ryujinx +{ + class Program + { + static void Main(string[] args) + { + IGalRenderer Renderer = new OpenGLRenderer(); + + Switch Ns = new Switch(Renderer); + + if (args.Length == 1) + { + if (Directory.Exists(args[0])) + { + string[] RomFsFiles = Directory.GetFiles(args[0], "*.istorage"); + + if (RomFsFiles.Length > 0) + { + Console.WriteLine("Loading as cart with RomFS."); + + Ns.Os.LoadCart(args[0], RomFsFiles[0]); + } + else + { + Console.WriteLine("Loading as cart WITHOUT RomFS."); + + Ns.Os.LoadCart(args[0]); + } + } + else if (File.Exists(args[0])) + { + Console.WriteLine("Loading as homebrew."); + + Ns.Os.LoadProgram(args[0]); + } + } + else + { + Console.WriteLine("Please specify the folder with the NSOs/IStorage or a NSO/NRO."); + } + + using (GLScreen Screen = new GLScreen(Ns, Renderer)) + { + Screen.Run(60.0); + } + + Ns.Os.StopAllProcesses(); + + Ns.Dispose(); + } + } +} |