summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-11-01 23:16:11 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-11-01 23:16:11 +0100
commit513f93b01ac22842746f493c23bb48eb36071dc5 (patch)
treed1585d85d0140e2842342bc05c20fc482767f8f5 /ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
parent92d2d05bd439f8b76eb4bf5822167b463e227807 (diff)
spring v2: magic nums -> ui, squash uninit mem access
-sthalik&mm0zct
Diffstat (limited to 'ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp')
-rw-r--r--ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
index 6b1a559d..2efefbb3 100644
--- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
+++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dialog.cpp
@@ -117,6 +117,10 @@ void TrackerControls::loadSettings() {
ui.chkEnableY->setChecked(iniFile.value ( "EnableY", 1 ).toBool());
ui.chkEnableZ->setChecked(iniFile.value ( "EnableZ", 1 ).toBool());
#endif
+ ui.yawSpring->setChecked(iniFile.value("yaw-spring", true).toBool());
+ ui.deadzone->setValue(iniFile.value("deadzone", 0.02).toDouble());
+ ui.constantDrift->setValue(iniFile.value("constant-drift", 0.000005).toDouble());
+ ui.persistence->setValue(iniFile.value("persistence", 0.9999).toDouble());
iniFile.endGroup ();
settingsDirty = false;
@@ -140,6 +144,10 @@ void TrackerControls::save() {
iniFile.setValue ( "EnableY", ui.chkEnableY->isChecked() );
iniFile.setValue ( "EnableZ", ui.chkEnableZ->isChecked() );
#endif
+ iniFile.setValue("yaw-spring", ui.yawSpring->isChecked());
+ iniFile.setValue("deadzone", ui.deadzone->value());
+ iniFile.setValue("constant-drift", ui.constantDrift->value());
+ iniFile.setValue("persistence", ui.persistence->value());
iniFile.endGroup ();
settingsDirty = false;