From f73c11744eb81e8dde92a7b44ad80200d5ac1747 Mon Sep 17 00:00:00 2001 From: jduncanator <1518948+jduncanator@users.noreply.github.com> Date: Wed, 13 Feb 2019 10:24:11 +1100 Subject: [PATCH] Config: Resolve config and file log to application directory (#580) --- Ryujinx/Configuration.cs | 2 +- Ryujinx/Program.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Ryujinx/Configuration.cs b/Ryujinx/Configuration.cs index 5f1f86789c..96f4d66f4b 100644 --- a/Ryujinx/Configuration.cs +++ b/Ryujinx/Configuration.cs @@ -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 )); diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs index 19916fe9f4..c73ff9b9c2 100644 --- a/Ryujinx/Program.cs +++ b/Ryujinx/Program.cs @@ -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;