diff options
| author | Chris Bessent <lost.dragonist@gmail.com> | 2021-05-01 15:18:15 -0700 |
|---|---|---|
| committer | Chris Bessent <lost.dragonist@gmail.com> | 2021-05-01 15:18:15 -0700 |
| commit | 4509911a8e8465ddd72882857b8883b2118922d5 (patch) | |
| tree | 80bdec2c43a06b0c90edfeac237505e7a24c38df /src | |
| parent | aafd5237360759aaeac8714ea31ad7a61f243037 (diff) | |
Add log for Microsoft Store / Gamepass installs
Diffstat (limited to 'src')
| -rw-r--r-- | src/sanitychecks.cpp | 18 |
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")) { |
