From ebbccfcdbfe2927e1cfdb2fd6abc0502c9a52aed Mon Sep 17 00:00:00 2001 From: Ac_K <Acoustik666@gmail.com> Date: Fri, 9 Feb 2018 04:23:20 +0100 Subject: [PATCH] config bugfix (#6) Include Ryujinx.conf file to the build folder. Fix the Ryujinx.conf filepath. --- Ryujinx.csproj | 5 +++++ Ryujinx/Config.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Ryujinx.csproj b/Ryujinx.csproj index 2c25afc0ff..9ad696d89f 100644 --- a/Ryujinx.csproj +++ b/Ryujinx.csproj @@ -9,4 +9,9 @@ <PackageReference Include="OpenTK.NETCore" Version="1.1.2749.6433" /> <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.4.0" /> </ItemGroup> + <ItemGroup> + <None Update="Ryujinx.conf"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + </ItemGroup> </Project> \ No newline at end of file diff --git a/Ryujinx/Config.cs b/Ryujinx/Config.cs index 2e4e56953a..c27060d2c1 100644 --- a/Ryujinx/Config.cs +++ b/Ryujinx/Config.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Reflection; namespace Ryujinx { @@ -17,7 +18,7 @@ namespace Ryujinx public static void Read() { - IniParser Parser = new IniParser("Ryujinx.conf"); + IniParser Parser = new IniParser(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "Ryujinx.conf")); LoggingEnableInfo = Convert.ToBoolean(Parser.Value("Logging_Enable_Info")); LoggingEnableTrace = Convert.ToBoolean(Parser.Value("Logging_Enable_Trace"));