aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteveice10 <1269164+Steveice10@users.noreply.github.com>2024-01-19 18:09:51 -0800
committerGitHub <noreply@github.com>2024-01-20 03:09:51 +0100
commita772b073ecb5c753acbddbf5861051d878f5153b (patch)
treefc4820559d32d24a07849af69436af04021ae069 /src
parent870d9599cc056e515dd63620fd10bf9fee4992ee (diff)
Support portable mode using the macOS app bundle. (#6147)1.1.1115
* Support portable mode using the macOS app bundle. * Apply suggestion Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com> --------- Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/Ryujinx.Common/Configuration/AppDataManager.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Ryujinx.Common/Configuration/AppDataManager.cs b/src/Ryujinx.Common/Configuration/AppDataManager.cs
index 2b4a594d..8a226d9a 100644
--- a/src/Ryujinx.Common/Configuration/AppDataManager.cs
+++ b/src/Ryujinx.Common/Configuration/AppDataManager.cs
@@ -63,6 +63,17 @@ namespace Ryujinx.Common.Configuration
string userProfilePath = Path.Combine(appDataPath, DefaultBaseDir);
string portablePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, DefaultPortableDir);
+ // On macOS, check for a portable directory next to the app bundle as well.
+ if (OperatingSystem.IsMacOS() && !Directory.Exists(portablePath))
+ {
+ string bundlePath = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", ".."));
+ // Make sure we're actually running within an app bundle.
+ if (bundlePath.EndsWith(".app"))
+ {
+ portablePath = Path.GetFullPath(Path.Combine(bundlePath, "..", DefaultPortableDir));
+ }
+ }
+
if (Directory.Exists(portablePath))
{
BaseDirPath = portablePath;