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
This commit is contained in:
parent
f3e12d5b02
commit
b9398f1f3a
15 changed files with 159 additions and 70 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue