From 26f3a90dc65d7f1bbaf405778c317a6a730a4b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Fri, 14 Jun 2024 18:00:08 +0200 Subject: [PATCH] Update following gamebryo updates for myGamesPath() in game feature. --- src/fallout4vrdataarchives.cpp | 8 ++------ src/fallout4vrdataarchives.h | 4 +--- src/game_fallout4vr_en.ts | 4 ++-- src/gamefallout4vr.cpp | 5 ++--- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/fallout4vrdataarchives.cpp b/src/fallout4vrdataarchives.cpp index b28d878..58a9a09 100644 --- a/src/fallout4vrdataarchives.cpp +++ b/src/fallout4vrdataarchives.cpp @@ -3,10 +3,6 @@ #include "iprofile.h" #include -Fallout4VRDataArchives::Fallout4VRDataArchives(const QDir& myGamesDir) - : GamebryoDataArchives(myGamesDir) -{} - QStringList Fallout4VRDataArchives::vanillaArchives() const { return {"Fallout4 - Textures1.ba2", "Fallout4 - Textures2.ba2", @@ -28,7 +24,7 @@ QStringList Fallout4VRDataArchives::archives(const MOBase::IProfile* profile) co QString iniFile = profile->localSettingsEnabled() ? QDir(profile->absolutePath()).absoluteFilePath("fallout4.ini") - : m_LocalGameDir.absoluteFilePath("fallout4.ini"); + : localGameDirectory().absoluteFilePath("fallout4.ini"); result.append(getArchivesFromKey(iniFile, "SResourceArchiveList")); result.append(getArchivesFromKey(iniFile, "SResourceArchiveList2")); @@ -42,7 +38,7 @@ void Fallout4VRDataArchives::writeArchiveList(MOBase::IProfile* profile, QString iniFile = profile->localSettingsEnabled() ? QDir(profile->absolutePath()).absoluteFilePath("fallout4.ini") - : m_LocalGameDir.absoluteFilePath("fallout4.ini"); + : localGameDirectory().absoluteFilePath("fallout4.ini"); if (list.length() > 255) { int splitIdx = list.lastIndexOf(",", 256); setArchivesToKey(iniFile, "SResourceArchiveList", list.mid(0, splitIdx)); diff --git a/src/fallout4vrdataarchives.h b/src/fallout4vrdataarchives.h index c7a6b79..71d0b3d 100644 --- a/src/fallout4vrdataarchives.h +++ b/src/fallout4vrdataarchives.h @@ -13,11 +13,9 @@ class IProfile; class Fallout4VRDataArchives : public GamebryoDataArchives { - public: - Fallout4VRDataArchives(const QDir& myGamesDir); + using GamebryoDataArchives::GamebryoDataArchives; -public: virtual QStringList vanillaArchives() const override; virtual QStringList archives(const MOBase::IProfile* profile) const override; diff --git a/src/game_fallout4vr_en.ts b/src/game_fallout4vr_en.ts index 6823bb9..4044f20 100644 --- a/src/game_fallout4vr_en.ts +++ b/src/game_fallout4vr_en.ts @@ -4,12 +4,12 @@ GameFallout4VR - + Fallout 4 VR Support Plugin - + Adds support for the game Fallout 4 VR. Splash by %1 diff --git a/src/gamefallout4vr.cpp b/src/gamefallout4vr.cpp index 7374582..0ce1f6d 100644 --- a/src/gamefallout4vr.cpp +++ b/src/gamefallout4vr.cpp @@ -35,9 +35,8 @@ bool GameFallout4VR::init(IOrganizer* moInfo) return false; } - registerFeature(std::make_shared(myGamesPath())); - registerFeature( - std::make_shared(myGamesPath(), "fallout4custom.ini")); + registerFeature(std::make_shared(this)); + registerFeature(std::make_shared(this, "fallout4custom.ini")); registerFeature(std::make_shared(this)); registerFeature( std::make_shared(m_Organizer->gameFeatures()));