diff options
| author | Silarn <jrim@rimpo.org> | 2018-05-01 13:01:44 -0500 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2018-05-01 13:01:44 -0500 |
| commit | d3c207193fe27c42ff958e3e74cbd2628c6a14a2 (patch) | |
| tree | a15bc1bfa7932804effee0f762594e2e5c7f2e72 /src/settings.cpp | |
| parent | 584c6049f981e601f6c88c00823ee322c9002bbe (diff) | |
Add all supported games to the nxmhandler config
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 6 |
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"), |
