summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bessent <lost.dragonist@gmail.com>2021-05-01 15:21:45 -0700
committerGitHub <noreply@github.com>2021-05-01 15:21:45 -0700
commit8bac17c2c57d75bb12052c6dfd7d4b1abdaf4208 (patch)
tree73d2dc46a24dd259328885396fe82485c788b6c9
parentf098491306f8aea2660bfde5f20dbba97c326301 (diff)
parent4509911a8e8465ddd72882857b8883b2118922d5 (diff)
Merge pull request #1508 from LostDragonist/gamepass
Add log for Microsoft Store / Gamepass installs
-rw-r--r--src/sanitychecks.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sanitychecks.cpp b/src/sanitychecks.cpp
index 1e673ff9..637cd83f 100644
--- a/src/sanitychecks.cpp
+++ b/src/sanitychecks.cpp
@@ -380,6 +380,23 @@ int checkProtected(const QDir& d, const QString& what)
return 0;
}
+int checkMicrosoftStore(const QDir& gameDir)
+{
+ const QStringList pathsToCheck = {
+ "/ModifiableWindowsApps/",
+ "/WindowsApps/",
+ };
+ for (auto badPath : pathsToCheck) {
+ if (gameDir.path().contains(badPath))
+ {
+ log::warn("the game is installed with the Microsoft Store / Gamepass and is not supported");
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
int checkPaths(IPluginGame& game, const Settings& s)
{
log::debug("checking paths");
@@ -387,6 +404,7 @@ int checkPaths(IPluginGame& game, const Settings& s)
int n = 0;
n += checkProtected(game.gameDirectory(), "the game");
+ n += checkMicrosoftStore(game.gameDirectory());
n += checkProtected(QApplication::applicationDirPath(), "Mod Organizer");
if (checkProtected(s.paths().base(), "the instance base directory")) {