From 5401dc8d52572b11b20245cc210e2350839a4f2e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 29 Nov 2024 17:06:40 +1000 Subject: [PATCH] Settings: Add EmuFolders::IsRunningInPortableMode() --- src/core/settings.cpp | 5 +++++ src/core/settings.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/core/settings.cpp b/src/core/settings.cpp index c089466e3..f3fe7078b 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -2335,3 +2335,8 @@ std::string EmuFolders::GetOverridableResourcePath(std::string_view name) return upath; } + +bool EmuFolders::IsRunningInPortableMode() +{ + return (AppRoot == DataRoot); +} diff --git a/src/core/settings.h b/src/core/settings.h index 70f054cf0..1a1b25db8 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -593,4 +593,7 @@ void Update(); /// Returns the path to a resource file, allowing the user to override it. std::string GetOverridableResourcePath(std::string_view name); + +/// Returns true if the application is running in portable mode. +bool IsRunningInPortableMode(); } // namespace EmuFolders