Add XCI, NSP and NCA loading support (#404)

* Add XCI and NCA loading support

* Code style changes

* Add NSP loading

* Changes from code review

* Read XCIs with patches. Code style

* Add KEYS.md file

* Make file extension matching case-insensitive
This commit is contained in:
Alex Barney 2018-09-08 12:33:27 -06:00 committed by gdkchan
parent ce1d5be212
commit 3227218114
6 changed files with 360 additions and 3 deletions

View file

@ -50,9 +50,25 @@ namespace Ryujinx
}
else if (File.Exists(args[0]))
{
Console.WriteLine("Loading as homebrew.");
Device.LoadProgram(args[0]);
switch (Path.GetExtension(args[0]).ToLowerInvariant())
{
case ".xci":
Console.WriteLine("Loading as XCI.");
Device.LoadXci(args[0]);
break;
case ".nca":
Console.WriteLine("Loading as NCA.");
Device.LoadNca(args[0]);
break;
case ".nsp":
Console.WriteLine("Loading as NSP.");
Device.LoadNsp(args[0]);
break;
default:
Console.WriteLine("Loading as homebrew.");
Device.LoadProgram(args[0]);
break;
}
}
}
else