From 4509911a8e8465ddd72882857b8883b2118922d5 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Sat, 1 May 2021 15:18:15 -0700 Subject: Add log for Microsoft Store / Gamepass installs --- src/sanitychecks.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/sanitychecks.cpp') 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")) { -- cgit v1.3.1