aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda/src
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-23 17:44:12 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-23 17:44:12 -0600
commitc360dbf9c42f71e7931c56b7a396ba7f7e9982e6 (patch)
tree12b44a194db2f8a44a3052b02fced46766a5deee /libs/game_bethesda/src
parenta8a287cd102001dddff30deec66140136da422d5 (diff)
Remove umu-run, keep game as child process for Steam tracking
- Remove umu-run entirely (crashed due to pressure-vessel/FUSE incompatibility) — use raw `proton run` instead - Replace startDetached() with QProcess::start() so the game stays in Fluorine's process tree. This lets Steam track the game lifetime and makes the "close game" button work when Fluorine is added as a non-Steam game. - Add writeIniValueDirect/readIniValueDirect for safe Bethesda INI handling without QSettings corruption - Fix prefix_setup.rs to skip umu-run bootstrapping - Clean up settings UI, build scripts, and docs for umu-run removal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/game_bethesda/src')
-rw-r--r--libs/game_bethesda/src/gamebryo/gamebryolocalsavegames.cpp21
-rw-r--r--libs/game_bethesda/src/gamebryo/gamegamebryo.cpp21
2 files changed, 22 insertions, 20 deletions
diff --git a/libs/game_bethesda/src/gamebryo/gamebryolocalsavegames.cpp b/libs/game_bethesda/src/gamebryo/gamebryolocalsavegames.cpp
index 4c1199c..2daf2c3 100644
--- a/libs/game_bethesda/src/gamebryo/gamebryolocalsavegames.cpp
+++ b/libs/game_bethesda/src/gamebryo/gamebryolocalsavegames.cpp
@@ -23,21 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <stddef.h>
#include <string>
-#include <QSettings>
-
#include "gamegamebryo.h"
-// Helper to remove a key from a Bethesda-style INI file
-static void removeIniValue(const QString& iniFile, const QString& section,
- const QString& key)
-{
- QSettings settings(iniFile, QSettings::IniFormat);
- settings.beginGroup(section);
- settings.remove(key);
- settings.endGroup();
- settings.sync();
-}
-
GamebryoLocalSavegames::GamebryoLocalSavegames(const GameGamebryo* game,
const QString& iniFileName)
: m_Game{game}, m_IniFileName(iniFileName)
@@ -119,20 +106,20 @@ bool GamebryoLocalSavegames::prepareProfile(MOBase::IProfile* profile)
if (savedPath != "DELETE_ME") {
MOBase::WriteRegistryValue("General", "sLocalSavePath", savedPath, iniFilePath);
} else {
- removeIniValue(iniFilePath, "General", "sLocalSavePath");
+ MOBase::RemoveRegistryValue("General", "sLocalSavePath", iniFilePath);
}
if (savedMyGames != "DELETE_ME") {
MOBase::WriteRegistryValue("General", "bUseMyGamesDirectory", savedMyGames,
iniFilePath);
} else {
- removeIniValue(iniFilePath, "General", "bUseMyGamesDirectory");
+ MOBase::RemoveRegistryValue("General", "bUseMyGamesDirectory", iniFilePath);
}
QFile::remove(saveIni);
}
// Otherwise just delete the setting
else {
- removeIniValue(iniFilePath, "General", "sLocalSavePath");
- removeIniValue(iniFilePath, "General", "bUseMyGamesDirectory");
+ MOBase::RemoveRegistryValue("General", "sLocalSavePath", iniFilePath);
+ MOBase::RemoveRegistryValue("General", "bUseMyGamesDirectory", iniFilePath);
}
}
diff --git a/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp b/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp
index 4a92440..2fd45cd 100644
--- a/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp
+++ b/libs/game_bethesda/src/gamebryo/gamegamebryo.cpp
@@ -357,6 +357,15 @@ void GameGamebryo::ensureIniFilesExist(const QString& basePath)
}
#ifndef _WIN32
+ // Remove broken symlinks — QFileInfo::exists() follows symlinks and
+ // returns false for dangling ones, but QFile::copy() fails with
+ // "File exists" because the symlink inode is still there.
+ if (targetInfo.isSymLink() && !targetInfo.exists()) {
+ QFile::remove(targetPath);
+ }
+#endif
+
+#ifndef _WIN32
// On Linux, search for a differently-cased version of this INI file
// (e.g., FalloutPrefs.ini when we expect falloutprefs.ini).
// We can't use resolveFileCaseInsensitive here because the exact-case
@@ -413,15 +422,21 @@ void GameGamebryo::ensureIniFilesExist(const QString& basePath)
if (targetInfo.exists()) {
QFile::remove(targetPath);
}
- if (QFile::copy(defaultIniPath, targetPath)) {
+ QFile srcFile(defaultIniPath);
+ if (srcFile.copy(targetPath)) {
// Make the copy writable
QFile::setPermissions(
targetPath,
QFile::permissions(targetPath) | QFile::WriteUser | QFile::WriteOwner);
MOBase::log::info("Seeded '{}' from default INI '{}'", iniFile, defaultIniPath);
} else {
- MOBase::log::warn("Failed to copy default INI '{}' -> '{}'",
- defaultIniPath, targetPath);
+ MOBase::log::warn("Failed to copy default INI '{}' -> '{}': {} "
+ "(srcExists={}, srcSize={}, targetExists={}, dirExists={})",
+ defaultIniPath, targetPath, srcFile.errorString(),
+ QFileInfo::exists(defaultIniPath),
+ QFileInfo(defaultIniPath).size(),
+ QFileInfo::exists(targetPath),
+ QFileInfo(targetPath).dir().exists());
}
}