From 849a0a0ef40c9fa1feb15b880aa52fccdd84f234 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 5 Jul 2013 14:34:46 +0200 Subject: bugfix: nxmhandler in headless calls didn't save changes --- src/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') 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); -- cgit v1.3.1