summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-07-05 14:34:46 +0200
committerTannin <devnull@localhost>2013-07-05 14:34:46 +0200
commit849a0a0ef40c9fa1feb15b880aa52fccdd84f234 (patch)
tree41a67cedb579722c9c30921d791406a42ca01d2e /src/mainwindow.cpp
parent3b3717a0214a1a923ef004b90ace68197492d0ba (diff)
bugfix: nxmhandler in headless calls didn't save changes
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);