Improved logging (#103)

This commit is contained in:
gdkchan 2018-04-24 15:57:39 -03:00 committed by GitHub
parent 4e24866b47
commit a8ba340dde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 555 additions and 870 deletions

View file

@ -12,10 +12,6 @@ namespace Ryujinx
{
static void Main(string[] args)
{
Config.Read();
AOptimizations.DisableMemoryChecks = !Config.EnableMemoryChecks;
Console.Title = "Ryujinx Console";
IGalRenderer Renderer = new OpenGLRenderer();
@ -24,6 +20,10 @@ namespace Ryujinx
Switch Ns = new Switch(Renderer, AudioOut);
Config.Read(Ns.Log);
Ns.Log.Updated += ConsoleLog.PrintLog;
if (args.Length == 1)
{
if (Directory.Exists(args[0]))
@ -37,27 +37,27 @@ namespace Ryujinx
if (RomFsFiles.Length > 0)
{
Logging.Info(LogClass.Loader, "Loading as cart with RomFS.");
Console.WriteLine("Loading as cart with RomFS.");
Ns.LoadCart(args[0], RomFsFiles[0]);
}
else
{
Logging.Info(LogClass.Loader, "Loading as cart WITHOUT RomFS.");
Console.WriteLine("Loading as cart WITHOUT RomFS.");
Ns.LoadCart(args[0]);
}
}
else if (File.Exists(args[0]))
{
Logging.Info(LogClass.Loader, "Loading as homebrew.");
Console.WriteLine("Loading as homebrew.");
Ns.LoadProgram(args[0]);
}
}
else
{
Logging.Error(LogClass.Loader, "Please specify the folder with the NSOs/IStorage or a NSO/NRO.");
Console.WriteLine("Please specify the folder with the NSOs/IStorage or a NSO/NRO.");
}
using (GLScreen Screen = new GLScreen(Ns, Renderer))