aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure
diff options
context:
space:
mode:
authormageven <62494521+mageven@users.noreply.github.com>2020-08-30 22:21:53 +0530
committerGitHub <noreply@github.com>2020-08-30 18:51:53 +0200
commitb9398f1f3a13612a0bc3e64205cdb7eca3f48d4d (patch)
treedc4180e4d2f28d061776cf3fd00741f3fc8ee2fc /ARMeilleure
parentf3e12d5b02ac77f0b4d8a0caf185c7afb578d0a4 (diff)
Allow launching with custom data directories (#1505)
* Allow launching with custom data directories Don't load alternate keys when using custom directory * Address gdkchan's comments * Misc fixes to log levels Added more enabled log levels by default Moved successful config updation to Notice as 1. It's not a warning 2. Warnings could've been disabled by the config load and hence message would be lost
Diffstat (limited to 'ARMeilleure')
-rw-r--r--ARMeilleure/Translation/PTC/Ptc.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/ARMeilleure/Translation/PTC/Ptc.cs b/ARMeilleure/Translation/PTC/Ptc.cs
index ccb3f705..c6069d88 100644
--- a/ARMeilleure/Translation/PTC/Ptc.cs
+++ b/ARMeilleure/Translation/PTC/Ptc.cs
@@ -1,6 +1,7 @@
using ARMeilleure.CodeGen;
using ARMeilleure.CodeGen.Unwinding;
using ARMeilleure.Memory;
+using Ryujinx.Common.Configuration;
using Ryujinx.Common.Logging;
using System;
using System.Buffers.Binary;
@@ -22,8 +23,6 @@ namespace ARMeilleure.Translation.PTC
private const int InternalVersion = 1471; //! To be incremented manually for each change to the ARMeilleure project.
- private const string BaseDir = "Ryujinx";
-
private const string ActualDir = "0";
private const string BackupDir = "1";
@@ -49,8 +48,6 @@ namespace ARMeilleure.Translation.PTC
private static readonly AutoResetEvent _loggerEvent;
- private static readonly string _basePath;
-
private static readonly object _lock;
private static bool _disposed;
@@ -83,8 +80,6 @@ namespace ARMeilleure.Translation.PTC
_loggerEvent = new AutoResetEvent(false);
- _basePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), BaseDir);
-
_lock = new object();
_disposed = false;
@@ -130,8 +125,8 @@ namespace ARMeilleure.Translation.PTC
if (enabled)
{
- string workPathActual = Path.Combine(_basePath, "games", TitleIdText, "cache", "cpu", ActualDir);
- string workPathBackup = Path.Combine(_basePath, "games", TitleIdText, "cache", "cpu", BackupDir);
+ string workPathActual = Path.Combine(AppDataManager.GamesDirPath, TitleIdText, "cache", "cpu", ActualDir);
+ string workPathBackup = Path.Combine(AppDataManager.GamesDirPath, TitleIdText, "cache", "cpu", BackupDir);
if (!Directory.Exists(workPathActual))
{