summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 9510999d..4174c397 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -133,7 +133,11 @@ 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->gameShortName().toStdWString();
+ for (QString altGame : m_GamePlugin->validShortNames()) {
+ parameters += L"," + altGame.toStdWString();
+ }
+ parameters += 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"),