summaryrefslogtreecommitdiffhomepage
path: root/opentrack-logic
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack-logic')
-rw-r--r--opentrack-logic/main-settings.hpp20
-rw-r--r--opentrack-logic/state.hpp4
2 files changed, 18 insertions, 6 deletions
diff --git a/opentrack-logic/main-settings.hpp b/opentrack-logic/main-settings.hpp
index 34997ea0..1aa0d38c 100644
--- a/opentrack-logic/main-settings.hpp
+++ b/opentrack-logic/main-settings.hpp
@@ -47,9 +47,22 @@ struct key_opts
{}
};
-struct main_settings
+struct module_settings
{
+ pbundle b;
value<QString> tracker_dll, filter_dll, protocol_dll;
+ module_settings() :
+ b(bundle("modules")),
+ tracker_dll(b, "tracker-dll", ""),
+ filter_dll(b, "filter-dll", "Accela"),
+ protocol_dll(b, "protocol-dll", "freetrack 2.0 Enhanced")
+ {
+ }
+};
+
+struct main_settings
+{
+ pbundle b;
axis_opts a_x, a_y, a_z, a_yaw, a_pitch, a_roll;
value<bool> tcomp_p, tcomp_tz;
value<bool> tray_enabled;
@@ -60,10 +73,7 @@ struct main_settings
key_opts key_center, key_toggle, key_zero;
key_opts key_toggle_press, key_zero_press;
main_settings() :
- opts("opentrack-ui"),
- tracker_dll(b, "tracker-dll", ""),
- filter_dll(b, "filter-dll", "Accela"),
- protocol_dll(b, "protocol-dll", "freetrack 2.0 Enhanced"),
+ b(bundle("opentrack-ui")),
a_x(b, "x", TX),
a_y(b, "y", TY),
a_z(b, "z", TZ),
diff --git a/opentrack-logic/state.hpp b/opentrack-logic/state.hpp
index ff46cc36..f9bb82c0 100644
--- a/opentrack-logic/state.hpp
+++ b/opentrack-logic/state.hpp
@@ -17,13 +17,15 @@ using namespace options;
#include "selected-libraries.hpp"
#include "work.hpp"
-struct State {
+struct State
+{
State() :
pose(std::vector<axis_opts*>{&s.a_x, &s.a_y, &s.a_z, &s.a_yaw, &s.a_pitch, &s.a_roll})
{}
Modules modules;
SelectedLibraries libs;
main_settings s;
+ module_settings m;
Mappings pose;
mem<Work> work;
};