From 6482a7e2582867d51c19bb12d513bc52dde2cc66 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 29 Jun 2016 13:05:30 +0200 Subject: compat/options: separate module dll names from rest of settings The other settings are modified by the options dialog. These are in the main ui. We need to be able to save modules without saving the options dialog. --- opentrack-logic/main-settings.hpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'opentrack-logic/main-settings.hpp') 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 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 tcomp_p, tcomp_tz; value 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), -- cgit v1.2.3