2022-11-08 15:57:45 +00:00
|
|
|
From f2d3b349d8487cf0ee50b36ba024ac513d36f826 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Carles Pastor <cpbadosa@gmail.com>
|
|
|
|
Date: Sat, 20 Aug 2022 13:35:32 +0200
|
|
|
|
Subject: [PATCH] Detect we are running inside a flatpak sandbox
|
2022-06-15 13:18:00 +00:00
|
|
|
|
2022-11-08 15:57:45 +00:00
|
|
|
---
|
|
|
|
Source/Core/UICommon/UICommon.cpp | 4 ++--
|
|
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
2022-06-15 13:18:00 +00:00
|
|
|
|
|
|
|
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
|
2022-11-08 15:57:45 +00:00
|
|
|
index 8d9dc2abb8..8a9d39a3d5 100644
|
2022-06-15 13:18:00 +00:00
|
|
|
--- a/Source/Core/UICommon/UICommon.cpp
|
|
|
|
+++ b/Source/Core/UICommon/UICommon.cpp
|
2022-11-08 15:57:45 +00:00
|
|
|
@@ -348,7 +348,7 @@ void SetUserDirectory(std::string custom_path)
|
2022-06-15 13:18:00 +00:00
|
|
|
// -> Use GetExeDirectory()/User
|
2022-11-08 15:57:45 +00:00
|
|
|
// 2. $DOLPHIN_EMU_USERPATH is set
|
2022-06-15 13:18:00 +00:00
|
|
|
// -> Use $DOLPHIN_EMU_USERPATH
|
|
|
|
- // 3. ~/.dolphin-emu directory exists
|
|
|
|
+ // 3. ~/.dolphin-emu directory exists, and we're not in flatpak
|
|
|
|
// -> Use ~/.dolphin-emu
|
|
|
|
// 4. Default
|
|
|
|
// -> Use XDG basedir, see
|
2022-11-08 15:57:45 +00:00
|
|
|
@@ -381,7 +381,7 @@ void SetUserDirectory(std::string custom_path)
|
2022-06-15 13:18:00 +00:00
|
|
|
{
|
2022-11-08 15:57:45 +00:00
|
|
|
user_path = home_path + "." DOLPHIN_DATA_DIR DIR_SEP;
|
2023-01-10 16:25:50 +00:00
|
|
|
|
2022-11-08 15:57:45 +00:00
|
|
|
- if (!File::Exists(user_path))
|
|
|
|
+ if (File::Exists("/.flatpak-info") || !File::Exists(user_path))
|
|
|
|
{
|
|
|
|
const char* data_home = getenv("XDG_DATA_HOME");
|
|
|
|
std::string data_path =
|
2023-01-10 16:25:50 +00:00
|
|
|
--
|
|
|
|
2.37.1
|