diff options
Diffstat (limited to 'libs/game_bethesda/src/games')
10 files changed, 34 insertions, 14 deletions
diff --git a/libs/game_bethesda/src/games/enderalse/gameenderalse.cpp b/libs/game_bethesda/src/games/enderalse/gameenderalse.cpp index 26587b8..e2f8952 100644 --- a/libs/game_bethesda/src/games/enderalse/gameenderalse.cpp +++ b/libs/game_bethesda/src/games/enderalse/gameenderalse.cpp @@ -55,7 +55,7 @@ void GameEnderalSE::detectGame() { m_GamePath = identifyGamePath(); checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QString GameEnderalSE::identifyGamePath() const @@ -99,7 +99,7 @@ void GameEnderalSE::setGamePath(const QString& path) { m_GamePath = path; checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QDir GameEnderalSE::savesDirectory() const diff --git a/libs/game_bethesda/src/games/fallout3/gamefallout3.cpp b/libs/game_bethesda/src/games/fallout3/gamefallout3.cpp index 75e1ea3..b0d3be7 100644 --- a/libs/game_bethesda/src/games/fallout3/gamefallout3.cpp +++ b/libs/game_bethesda/src/games/fallout3/gamefallout3.cpp @@ -104,7 +104,7 @@ void GameFallout3::detectGame() { m_GamePath = identifyGamePath(); setGameVariant(identifyVariant()); - m_MyGamesPath = determineMyGamesPath("Fallout3"); + m_MyGamesPath = determineMyGamesPath("Fallout3", !m_GamePath.isEmpty()); } QList<ExecutableInfo> GameFallout3::executables() const diff --git a/libs/game_bethesda/src/games/fallout4/gamefallout4.cpp b/libs/game_bethesda/src/games/fallout4/gamefallout4.cpp index 02d30cb..d1ba92f 100644 --- a/libs/game_bethesda/src/games/fallout4/gamefallout4.cpp +++ b/libs/game_bethesda/src/games/fallout4/gamefallout4.cpp @@ -63,7 +63,7 @@ QString GameFallout4::gameName() const void GameFallout4::detectGame() { m_GamePath = identifyGamePath(); - m_MyGamesPath = determineMyGamesPath("Fallout4"); + m_MyGamesPath = determineMyGamesPath("Fallout4", !m_GamePath.isEmpty()); } QList<ExecutableInfo> GameFallout4::executables() const diff --git a/libs/game_bethesda/src/games/fallout4london/gamefo4london.cpp b/libs/game_bethesda/src/games/fallout4london/gamefo4london.cpp index 646bf1c..06a39bd 100644 --- a/libs/game_bethesda/src/games/fallout4london/gamefo4london.cpp +++ b/libs/game_bethesda/src/games/fallout4london/gamefo4london.cpp @@ -65,7 +65,7 @@ QString GameFallout4London::gameName() const void GameFallout4London::detectGame() { m_GamePath = identifyGamePath(); - m_MyGamesPath = determineMyGamesPath("Fallout4"); + m_MyGamesPath = determineMyGamesPath("Fallout4", !m_GamePath.isEmpty()); } QString GameFallout4London::identifyGamePath() const diff --git a/libs/game_bethesda/src/games/fallout4vr/gamefallout4vr.cpp b/libs/game_bethesda/src/games/fallout4vr/gamefallout4vr.cpp index 852bf7d..e0e5e38 100644 --- a/libs/game_bethesda/src/games/fallout4vr/gamefallout4vr.cpp +++ b/libs/game_bethesda/src/games/fallout4vr/gamefallout4vr.cpp @@ -55,7 +55,7 @@ QString GameFallout4VR::gameName() const void GameFallout4VR::detectGame() { m_GamePath = identifyGamePath(); - m_MyGamesPath = determineMyGamesPath("Fallout4VR"); + m_MyGamesPath = determineMyGamesPath("Fallout4VR", !m_GamePath.isEmpty()); } QList<ExecutableInfo> GameFallout4VR::executables() const diff --git a/libs/game_bethesda/src/games/fallout76/gamefallout76.cpp b/libs/game_bethesda/src/games/fallout76/gamefallout76.cpp index bfeb507..c1348f3 100644 --- a/libs/game_bethesda/src/games/fallout76/gamefallout76.cpp +++ b/libs/game_bethesda/src/games/fallout76/gamefallout76.cpp @@ -50,7 +50,7 @@ QString GameFallout76::gameName() const void GameFallout76::detectGame() { m_GamePath = identifyGamePath(); - m_MyGamesPath = determineMyGamesPath(gameName()); + m_MyGamesPath = determineMyGamesPath(gameName(), !m_GamePath.isEmpty()); } QList<ExecutableInfo> GameFallout76::executables() const diff --git a/libs/game_bethesda/src/games/falloutnv/gamefalloutnv.cpp b/libs/game_bethesda/src/games/falloutnv/gamefalloutnv.cpp index 7a147e5..f7b9413 100644 --- a/libs/game_bethesda/src/games/falloutnv/gamefalloutnv.cpp +++ b/libs/game_bethesda/src/games/falloutnv/gamefalloutnv.cpp @@ -102,7 +102,7 @@ void GameFalloutNV::setGamePath(const QString& path) { m_GamePath = path; checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QDir GameFalloutNV::savesDirectory() const @@ -137,7 +137,7 @@ void GameFalloutNV::detectGame() { m_GamePath = identifyGamePath(); checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QList<ExecutableInfo> GameFalloutNV::executables() const diff --git a/libs/game_bethesda/src/games/skyrimse/gameskyrimse.cpp b/libs/game_bethesda/src/games/skyrimse/gameskyrimse.cpp index d0492af..377c65c 100644 --- a/libs/game_bethesda/src/games/skyrimse/gameskyrimse.cpp +++ b/libs/game_bethesda/src/games/skyrimse/gameskyrimse.cpp @@ -58,7 +58,7 @@ void GameSkyrimSE::detectGame() { m_GamePath = identifyGamePath(); checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QString GameSkyrimSE::identifyGamePath() const @@ -110,7 +110,7 @@ void GameSkyrimSE::setGamePath(const QString& path) { m_GamePath = path; checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QDir GameSkyrimSE::savesDirectory() const diff --git a/libs/game_bethesda/src/games/starfield/gamestarfield.cpp b/libs/game_bethesda/src/games/starfield/gamestarfield.cpp index c6c211a..ebec948 100644 --- a/libs/game_bethesda/src/games/starfield/gamestarfield.cpp +++ b/libs/game_bethesda/src/games/starfield/gamestarfield.cpp @@ -67,7 +67,7 @@ QString GameStarfield::gameName() const void GameStarfield::detectGame() { m_GamePath = identifyGamePath(); - m_MyGamesPath = determineMyGamesPath("Starfield"); + m_MyGamesPath = determineMyGamesPath("Starfield", !m_GamePath.isEmpty()); } QString GameStarfield::identifyGamePath() const @@ -77,16 +77,36 @@ QString GameStarfield::identifyGamePath() const QDir GameStarfield::dataDirectory() const { +#ifdef _WIN32 + // On Windows, USVFS hooks both the game-side Data folder (where SFSE + // loads plugins from) and My Games\Starfield\Data (where loose content + // lives) transparently, so MO2 can report the My Games path as primary. QDir dataDir = documentsDirectory().absoluteFilePath("Data"); if (!dataDir.exists()) dataDir.mkdir(dataDir.path()); return documentsDirectory().absoluteFilePath("Data"); +#else + // On Linux we have a single FUSE mount, so the primary dataDirectory + // MUST be the game-install Data folder — that's where SFSE looks for + // plugins. If the mount lived under My Games/Starfield/Data, the + // base game Data folder would only see dangling symlinks and SFSE + // plugins would silently fail to load. See issue #56. + return gameDirectory().absoluteFilePath("Data"); +#endif } QMap<QString, QDir> GameStarfield::secondaryDataDirectories() const { QMap<QString, QDir> directories; +#ifdef _WIN32 directories.insert("game_data", gameDirectory().absoluteFilePath("Data")); +#else + // Primary is now gameDirectory/Data; My Games/Starfield/Data still + // needs to exist so the launcher and loose-file content work. Get it + // populated via the secondary-mapping symlink path. + directories.insert("documents_data", + documentsDirectory().absoluteFilePath("Data")); +#endif return directories; } diff --git a/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp b/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp index e09ddf0..7ba105b 100644 --- a/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp +++ b/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp @@ -126,7 +126,7 @@ void GameFalloutTTW::setGamePath(const QString& path) { m_GamePath = path; checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QDir GameFalloutTTW::savesDirectory() const @@ -166,7 +166,7 @@ void GameFalloutTTW::detectGame() { m_GamePath = identifyGamePath(); checkVariants(); - m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); + m_MyGamesPath = determineMyGamesPath(gameDirectoryName(), !m_GamePath.isEmpty()); } QList<ExecutableInfo> GameFalloutTTW::executables() const |
