diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-08 03:30:04 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-08 03:30:04 -0500 |
| commit | 3de4056df4ea5d0afbcea388ad8d681daea1aac3 (patch) | |
| tree | fc5978451f9f51b84268f45bd2fa6f5d4a17baaf /libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp | |
| parent | 5ba23a6d7a40052d9e1d4bd0cf018cfe7814d03a (diff) | |
Remove NaK/Rust dependency, port remaining functionality to native C++
Replace NaK Rust crate and nak_ffi with native C++ implementations:
- Game detection (Steam, Heroic, Bottles), VDF parser, icon extraction
- Prefix symlinks, SLR manager, Steam path detection
- Known games database
Add FUSE VFS optimizations: zero-copy reads via fuse_reply_data,
default_permissions mount option, FUSE_CAP_ASYNC_DIO, FUSE_CAP_EXPIRE_ONLY,
lookup cache parent index, cached mode bits, increased I/O buffer sizes.
Update build system, prefix setup, and various fixes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp')
| -rw-r--r-- | libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp b/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp index cfd8ca8..e09ddf0 100644 --- a/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp +++ b/libs/game_bethesda/src/games/ttw/gamefalloutttw.cpp @@ -15,9 +15,8 @@ #include <gamebryosavegameinfo.h> #include <gamebryounmanagedmods.h> -#ifdef HAS_NAK_FFI -#include <nak_ffi.h> -#include "scopeguard.h" +#ifndef _WIN32 +#include "gamedetection.h" #endif #include <QCoreApplication> @@ -85,23 +84,17 @@ QString GameFalloutTTW::identifyGamePath() const QString path = "Software\\Bethesda Softworks\\FalloutNV"; result = findInRegistry(HKEY_LOCAL_MACHINE, path.toStdWString().c_str(), L"Installed Path"); -#elif defined(HAS_NAK_FFI) +#else // TTW uses FalloutNV as its base game, so look for Fallout New Vegas - // (the base class would try matching "TTW" which NaK doesn't know about) - NakGameList gameList = nak_detect_all_games(); - ON_BLOCK_EXIT([&]() { - nak_game_list_free(gameList); - }); - - for (size_t i = 0; i < gameList.count; ++i) { - const NakGame& game = gameList.games[i]; - QString detectedName = QString::fromUtf8(game.name); - if (detectedName.contains("Fallout", Qt::CaseInsensitive) && - detectedName.contains("Vegas", Qt::CaseInsensitive)) { - QString detectedPath = QString::fromUtf8(game.install_path); - if (looksValid(QDir(detectedPath))) { - result = detectedPath; - break; + { + const GameScanResult scanResult = detectAllGames(); + for (const DetectedGame& game : scanResult.games) { + if (game.name.contains("Fallout", Qt::CaseInsensitive) && + game.name.contains("Vegas", Qt::CaseInsensitive)) { + if (looksValid(QDir(game.install_path))) { + result = game.install_path; + break; + } } } } |
