Config: Resolve config and file log to application directory (#580)

This commit is contained in:
jduncanator 2019-02-13 10:24:11 +11:00 committed by gdkchan
parent 8eebbc736e
commit f73c11744e
2 changed files with 4 additions and 2 deletions

View File

@ -157,7 +157,7 @@ namespace Ryujinx
if (Instance.EnableFileLog)
{
Logger.AddTarget(new AsyncLogTargetWrapper(
new FileLogTarget("Ryujinx.log"),
new FileLogTarget(Path.Combine(Program.ApplicationDirectory, "Ryujinx.log")),
1000,
AsyncLogTargetOverflowAction.Block
));

View File

@ -10,6 +10,8 @@ namespace Ryujinx
{
class Program
{
public static string ApplicationDirectory => AppDomain.CurrentDomain.BaseDirectory;
static void Main(string[] args)
{
Console.Title = "Ryujinx Console";
@ -20,7 +22,7 @@ namespace Ryujinx
Switch device = new Switch(renderer, audioOut);
Configuration.Load("Config.jsonc");
Configuration.Load(Path.Combine(ApplicationDirectory, "Config.jsonc"));
Configuration.Configure(device);
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;