summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 9dbce0f8..b95be745 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -3448,8 +3448,9 @@ void MainWindow::on_actionSettings_triggered()
void MainWindow::on_actionNexus_triggered()
{
std::wstring nxmPath = ToWString(QApplication::applicationDirPath() + "/nxmhandler.exe");
+ std::wstring executable = ToWString(QApplication::applicationFilePath());
::ShellExecuteW(NULL, L"open", nxmPath.c_str(),
- (std::wstring(L"reg ") + GameInfo::instance().getGameShortName() + L" " + nxmPath).c_str(), NULL, SW_SHOWNORMAL);
+ (std::wstring(L"reg ") + GameInfo::instance().getGameShortName() + L" " + executable).c_str(), NULL, SW_SHOWNORMAL);
::ShellExecuteW(NULL, L"open", GameInfo::instance().getNexusPage().c_str(), NULL, NULL, SW_SHOWNORMAL);
ui->tabWidget->setCurrentIndex(4);