diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-12 02:40:00 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-12 02:40:00 -0500 |
| commit | e0fb66428a9b78b4c326df8d7e30429a5b271d74 (patch) | |
| tree | 0fd83fe790ecb7d5cd3cfb36535e45d1b7118098 /libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp | |
| parent | e985dc340097831d4e5625941bded217abaa57b8 (diff) | |
Remove dead plugin scaffolds and duplicate lib dirs
The *_native C++ ports were replaced by bundled Python + .py plugins in
de4db79, but the source dirs were left behind without any CMake wiring —
causing confusion when editing them appears to do nothing. Same story
for libs/dds_header (stale duplicate of libs/preview_dds, unrelated to
the actively-used libs/dds-header) and libs/game_gamebryo (superseded
by libs/game_bethesda/src/gamebryo).
Removes:
- libs/basic_games_native
- libs/form43_checker_native
- libs/installer_omod_native
- libs/preview_dds_native
- libs/rootbuilder_native
- libs/script_extender_checker_native
- libs/dds_header
- libs/game_gamebryo
Diffstat (limited to 'libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp')
| -rw-r--r-- | libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp b/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp deleted file mode 100644 index 3dcba8a..0000000 --- a/libs/game_gamebryo/src/gamebryo/gamebryodataarchives.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "gamebryodataarchives.h" - -#include <Windows.h> - -#include <registry.h> -#include <utility.h> - -#include "gamegamebryo.h" - -GamebryoDataArchives::GamebryoDataArchives(const GameGamebryo* game) : m_Game{game} {} - -QDir GamebryoDataArchives::gameDirectory() const -{ - return QDir(m_Game->gameDirectory()).absolutePath(); -} - -QDir GamebryoDataArchives::localGameDirectory() const -{ - return QDir(m_Game->myGamesPath()).absolutePath(); -} - -QStringList GamebryoDataArchives::getArchivesFromKey(const QString& iniFile, - const QString& key, - const int size) const -{ - wchar_t* buffer = new wchar_t[size]; - QStringList result; - std::wstring iniFileW = QDir::toNativeSeparators(iniFile).toStdWString(); - - // epic ms fail: GetPrivateProfileString uses errno (for whatever reason) to signal a - // fail since the return value has a different meaning (number of bytes copied). - // HOWEVER, it will not set errno to 0 if NO error occured - errno = 0; - - if (::GetPrivateProfileStringW(L"Archive", key.toStdWString().c_str(), L"", buffer, - size, iniFileW.c_str()) != 0) { - result.append(QString::fromStdWString(buffer).split(',')); - } - - for (int i = 0; i < result.count(); ++i) { - result[i] = result[i].trimmed(); - } - delete[] buffer; - return result; -} - -void GamebryoDataArchives::setArchivesToKey(const QString& iniFile, const QString& key, - const QString& value) -{ - if (!MOBase::WriteRegistryValue(L"Archive", key.toStdWString().c_str(), - value.toStdWString().c_str(), - iniFile.toStdWString().c_str())) { - qWarning("failed to set archives in \"%s\"", qUtf8Printable(iniFile)); - } -} - -void GamebryoDataArchives::addArchive(MOBase::IProfile* profile, int index, - const QString& archiveName) -{ - QStringList current = archives(profile); - if (current.contains(archiveName, Qt::CaseInsensitive)) { - return; - } - - current.insert(index != INT_MAX ? index : current.size(), archiveName); - - writeArchiveList(profile, current); -} - -void GamebryoDataArchives::removeArchive(MOBase::IProfile* profile, - const QString& archiveName) -{ - QStringList current = archives(profile); - if (!current.contains(archiveName, Qt::CaseInsensitive)) { - return; - } - current.removeAll(archiveName); - - writeArchiveList(profile, current); -} |
