mirror of
https://github.com/ioquake/launch.git
synced 2024-11-22 03:21:23 +00:00
On first run, try to get the Q3A path on Windows by reading it from the registry.
This commit is contained in:
parent
05e1610bf7
commit
6da3a4113e
1 changed files with 13 additions and 0 deletions
|
@ -45,6 +45,19 @@ ioLaunch::ioLaunch(QWidget *parent) :
|
|||
parseQuake3Config();
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
// On first run, try to get the Q3A path on Windows by reading it from the registry.
|
||||
if (!settings.getHaveRun())
|
||||
{
|
||||
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Id\\Quake III Arena", QSettings::NativeFormat);
|
||||
|
||||
if (registry.contains("INSTALLPATH"))
|
||||
{
|
||||
settings.setQuakePath(registry.value("INSTALLPATH").toString());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
settings.setHaveRun(true);
|
||||
|
||||
// Populate the GUI with values read from settings.
|
||||
|
|
Loading…
Reference in a new issue