Skip to content

Commit

Permalink
Update following gamebryo updates for myGamesPath() in game feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jun 14, 2024
1 parent b2e1ecf commit 9f67175
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/game_skyrimvr_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<context>
<name>GameSkyrimVR</name>
<message>
<location filename="gameskyrimvr.cpp" line="117"/>
<location filename="gameskyrimvr.cpp" line="118"/>
<source>Skyrim VR Support Plugin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gameskyrimvr.cpp" line="127"/>
<location filename="gameskyrimvr.cpp" line="128"/>
<source>Adds support for the game Skyrim VR.</source>
<translation type="unfinished"></translation>
</message>
Expand Down
5 changes: 2 additions & 3 deletions src/gameskyrimvr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ bool GameSkyrimVR::init(IOrganizer* moInfo)
}

registerFeature(std::make_shared<SkyrimVRScriptExtender>(this));
registerFeature(std::make_shared<SkyrimVRDataArchives>(myGamesPath()));
registerFeature(
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "SkyrimVR.ini"));
registerFeature(std::make_shared<SkyrimVRDataArchives>(this));
registerFeature(std::make_shared<GamebryoLocalSavegames>(this, "SkyrimVR.ini"));
registerFeature(std::make_shared<SkyrimVRModDataChecker>(this));
registerFeature(std::make_shared<GamebryoSaveGameInfo>(this));
registerFeature(
Expand Down
8 changes: 2 additions & 6 deletions src/skyrimvrdataarchives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
#include "iprofile.h"
#include <utility.h>

SkyrimVRDataArchives::SkyrimVRDataArchives(const QDir& myGamesDir)
: GamebryoDataArchives(myGamesDir)
{}

QStringList SkyrimVRDataArchives::vanillaArchives() const
{
return {"Skyrim - Textures0.bsa", "Skyrim - Textures1.bsa", "Skyrim - Textures2.bsa",
Expand All @@ -24,7 +20,7 @@ QStringList SkyrimVRDataArchives::archives(const MOBase::IProfile* profile) cons

QString iniFile = profile->localSettingsEnabled()
? QDir(profile->absolutePath()).absoluteFilePath("skyrimvr.ini")
: m_LocalGameDir.absoluteFilePath("skyrimvr.ini");
: localGameDirectory().absoluteFilePath("skyrimvr.ini");
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList"));
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList2"));

Expand All @@ -38,7 +34,7 @@ void SkyrimVRDataArchives::writeArchiveList(MOBase::IProfile* profile,

QString iniFile = profile->localSettingsEnabled()
? QDir(profile->absolutePath()).absoluteFilePath("skyrimvr.ini")
: m_LocalGameDir.absoluteFilePath("skyrimvr.ini");
: localGameDirectory().absoluteFilePath("skyrimvr.ini");
if (list.length() > 255) {
int splitIdx = list.lastIndexOf(",", 256);
setArchivesToKey(iniFile, "SResourceArchiveList", list.mid(0, splitIdx));
Expand Down
4 changes: 1 addition & 3 deletions src/skyrimvrdataarchives.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ class IProfile;

class SkyrimVRDataArchives : public GamebryoDataArchives
{

public:
SkyrimVRDataArchives(const QDir& myGamesDir);
using GamebryoDataArchives::GamebryoDataArchives;

public:
virtual QStringList vanillaArchives() const override;
virtual QStringList archives(const MOBase::IProfile* profile) const override;

Expand Down

0 comments on commit 9f67175

Please sign in to comment.