summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Munro <brian.alexander.munro@gmail.com>2018-01-13 11:27:01 +0200
committerGitHub <noreply@github.com>2018-01-13 11:27:01 +0200
commit0413bf27a5b973989a6ec2df0a35a11d1beb60c9 (patch)
treea6baac9a09ea54199db93bb4a1a2894ab7d95aa3 /src
parentd2c5ed352dd1c0aac0478ca6d0e8cb121adc1b51 (diff)
parentca54760c13fbbb6ff685e04ef11ed5592823680c (diff)
Merge pull request #199 from matzman666/new_vfs_library
Fixed handling of nexus links for FO4VR.
Diffstat (limited to 'src')
-rw-r--r--src/downloadmanager.cpp4
-rw-r--r--src/settings.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index cb954ebe..593c754a 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -451,7 +451,7 @@ void DownloadManager::addNXMDownload(const QString &url)
{
NXMUrl nxmInfo(url);
- QString managedGame = m_ManagedGame->gameShortName();
+ QString managedGame = m_ManagedGame->gameNexusName();
qDebug("add nxm download: %s", qPrintable(url));
if (nxmInfo.game().compare(managedGame, Qt::CaseInsensitive) != 0) {
qDebug("download requested for wrong game (game: %s, url: %s)", qPrintable(managedGame), qPrintable(nxmInfo.game()));
@@ -1246,7 +1246,7 @@ int DownloadManager::startDownloadURLs(const QStringList &urls)
int DownloadManager::startDownloadNexusFile(int modID, int fileID)
{
int newID = m_ActiveDownloads.size();
- addNXMDownload(QString("nxm://%1/mods/%2/files/%3").arg(m_ManagedGame->gameShortName()).arg(modID).arg(fileID));
+ addNXMDownload(QString("nxm://%1/mods/%2/files/%3").arg(m_ManagedGame->gameNexusName()).arg(modID).arg(fileID));
return newID;
}
diff --git a/src/settings.cpp b/src/settings.cpp
index d1130e05..62041ca2 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -133,7 +133,7 @@ void Settings::registerAsNXMHandler(bool force)
std::wstring nxmPath = ToWString(QCoreApplication::applicationDirPath() + "/nxmhandler.exe");
std::wstring executable = ToWString(QCoreApplication::applicationFilePath());
std::wstring mode = force ? L"forcereg" : L"reg";
- std::wstring parameters = mode + L" " + m_GamePlugin->gameShortName().toStdWString() + L" \"" + executable + L"\"";
+ std::wstring parameters = mode + L" " + m_GamePlugin->gameNexusName().toStdWString() + L" \"" + executable + L"\"";
HINSTANCE res = ::ShellExecuteW(nullptr, L"open", nxmPath.c_str(), parameters.c_str(), nullptr, SW_SHOWNORMAL);
if ((int)res <= 32) {
QMessageBox::critical(nullptr, tr("Failed"),