diff options
| author | Tannin <devnull@localhost> | 2014-01-04 16:05:39 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-01-04 16:05:39 +0100 |
| commit | 0ea7d99b9f2a2119abce2454ae4ed13fcf065895 (patch) | |
| tree | 9d0262f7f6d06196c22873de6d58751ab6b4a130 /src/settings.cpp | |
| parent | e45b747c82832d227b9ee3ae9dcb214c4c7f67b5 (diff) | |
| parent | 6cffbd4f274106ac09d3729e104bf526141d7d79 (diff) | |
Merge
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 8086672a..895094f7 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -102,6 +102,15 @@ bool Settings::pluginBlacklisted(const QString &fileName) const return m_PluginBlacklist.contains(fileName); } +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"; + ::ShellExecuteW(NULL, L"open", nxmPath.c_str(), + (mode + L" " + GameInfo::instance().getGameShortName() + L" \"" + executable + L"\"").c_str(), NULL, SW_SHOWNORMAL); +} + void Settings::registerPlugin(IPlugin *plugin) { m_Plugins.push_back(plugin); |
