diff options
Diffstat (limited to 'ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp')
-rw-r--r-- | ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp b/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp index c9671c14..79f93538 100644 --- a/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp +++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp @@ -29,11 +29,22 @@ #include <QVariant> #include "ftnoir_tracker_hat_settings.h" +#ifdef OPENTRACK_API +#include "opentrack/options.hpp" +#endif void TrackerSettings::load_ini() { +#ifdef OPENTRACK_API + QSettings settings(options::group::org); // Registry settings (in HK_USER) +#else QSettings settings("opentrack"); // Registry settings (in HK_USER) +#endif +#ifdef OPENTRACK_API + QString currentFile = settings.value( options::group::filename_key, QCoreApplication::applicationDirPath() + options::group::default_path ).toString(); +#else QString currentFile = settings.value( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString(); +#endif QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) iniFile.beginGroup( "HAT" ); @@ -95,7 +106,7 @@ void TrackerSettings::save_ini() const { QSettings settings("opentrack"); // Registry settings (in HK_USER) - QString currentFile = settings.value( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString(); + QString currentFile = settings.value( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString(); QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) iniFile.beginGroup ( "HAT" ); |