diff options
Diffstat (limited to 'opentrack')
-rw-r--r-- | opentrack/main-settings.hpp | 6 | ||||
-rw-r--r-- | opentrack/options.hpp | 11 | ||||
-rw-r--r-- | opentrack/plugin-support.hpp | 13 | ||||
-rw-r--r-- | opentrack/selected-libraries.cpp | 6 | ||||
-rw-r--r-- | opentrack/selected-libraries.hpp | 2 | ||||
-rw-r--r-- | opentrack/tracker.cpp | 2 |
6 files changed, 11 insertions, 29 deletions
diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp index 250d4563..8e56ebab 100644 --- a/opentrack/main-settings.hpp +++ b/opentrack/main-settings.hpp @@ -7,11 +7,9 @@ using namespace options; struct axis_opts { - value<double> zero; value<bool> invert, altp; value<int> src; axis_opts(pbundle b, QString pfx, int idx) : - zero(b, n(pfx, "zero-pos"), 0), invert(b, n(pfx, "invert-sign"), false), altp(b, n(pfx, "alt-axis-sign"), false), src(b, n(pfx, "source-index"), idx) @@ -23,7 +21,7 @@ private: }; struct main_settings : opts { - value<QString> tracker_dll, filter_dll, protocol_dll; + value<QString> protocol_dll; axis_opts a_x, a_y, a_z, a_yaw, a_pitch, a_roll; value<bool> tcomp_p, tcomp_tz; value<bool> tray_enabled; @@ -31,8 +29,6 @@ struct main_settings : opts { value<bool> center_at_startup; main_settings() : opts("opentrack-ui"), - tracker_dll(b, "tracker-dll", ""), - filter_dll(b, "filter-dll", ""), protocol_dll(b, "protocol-dll", ""), a_x(b, "x", TX), a_y(b, "y", TY), diff --git a/opentrack/options.hpp b/opentrack/options.hpp index b7cc44a4..06697631 100644 --- a/opentrack/options.hpp +++ b/opentrack/options.hpp @@ -30,7 +30,6 @@ #include <QCoreApplication> #include <QFileInfo> #include <QDir> -#include <QRadioButton> #include <cinttypes> @@ -98,7 +97,7 @@ namespace options { } conf.endGroup(); } - static constexpr const char* org = "opentrack-2.3"; + static constexpr const char* org = "trackhat opentrack-2.3"; void save() { @@ -454,12 +453,4 @@ namespace options { base_value::connect(t, SIGNAL(currentChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE); base_value::connect(&v, SIGNAL(valueChanged(int)), t, SLOT(setCurrentIndex(int)), v.SAFE_CONNTYPE); } - - template<> - inline void tie_setting(value<bool>& v, QRadioButton* t) - { - t->setChecked(v); - base_value::connect(t, SIGNAL(toggled(bool)), &v, SLOT(setValue(bool)), v.DIRECT_CONNTYPE); - base_value::connect(&v, SIGNAL(valueChanged(bool)), t, SLOT(setChecked(bool)), v.SAFE_CONNTYPE); - } } diff --git a/opentrack/plugin-support.hpp b/opentrack/plugin-support.hpp index bc07c106..1c334e14 100644 --- a/opentrack/plugin-support.hpp +++ b/opentrack/plugin-support.hpp @@ -52,7 +52,7 @@ extern "C" typedef void* (*OPENTRACK_CTOR_FUNPTR)(void); extern "C" typedef Metadata* (*OPENTRACK_METADATA_FUNPTR)(void); struct dylib { - enum Type { Filter, Tracker, Protocol }; + enum Type { Protocol }; dylib(const QString& filename, Type t) : type(t), @@ -159,17 +159,14 @@ struct dylib { static QList<mem<dylib>> enum_libraries() { - const char* filters_n[] = { "opentrack-filter-*.", - "opentrack-tracker-*.", - "opentrack-proto-*." - }; - const Type filters_t[] = { Filter, Tracker, Protocol }; + const char* filters_n[] = { "opentrack-proto-*." }; + const Type filters_t[] = { Protocol }; QDir settingsDir( QCoreApplication::applicationDirPath() ); QList<mem<dylib>> ret; - for (int i = 0; i < 3; i++) + for (int i = 0; i < 1; i++) { QString filter = filters_n[i]; auto t = filters_t[i]; @@ -223,8 +220,6 @@ private: struct Modules { Modules() : module_list(dylib::enum_libraries()), - filter_modules(filter(dylib::Filter)), - tracker_modules(filter(dylib::Tracker)), protocol_modules(filter(dylib::Protocol)) {} QList<mem<dylib>>& filters() { return filter_modules; } diff --git a/opentrack/selected-libraries.cpp b/opentrack/selected-libraries.cpp index 8cb226c8..d76c0111 100644 --- a/opentrack/selected-libraries.cpp +++ b/opentrack/selected-libraries.cpp @@ -14,15 +14,15 @@ static mem<t> make_instance(mem<dylib> lib) return ret; } -SelectedLibraries::SelectedLibraries(QFrame* frame, dylibptr t, dylibptr p, dylibptr f) : +SelectedLibraries::SelectedLibraries(QFrame* frame, mem<ITracker> t, dylibptr p, mem<IFilter> f) : pTracker(nullptr), pFilter(nullptr), pProtocol(nullptr), correct(false) { - pTracker = make_instance<ITracker>(t); + pTracker = t; pProtocol = make_instance<IProtocol>(p); - pFilter = make_instance<IFilter>(f); + pFilter = f; if (!pTracker || !pProtocol) { diff --git a/opentrack/selected-libraries.hpp b/opentrack/selected-libraries.hpp index ffaf882c..07ea419b 100644 --- a/opentrack/selected-libraries.hpp +++ b/opentrack/selected-libraries.hpp @@ -8,7 +8,7 @@ struct SelectedLibraries { mem<ITracker> pTracker; mem<IFilter> pFilter; mem<IProtocol> pProtocol; - SelectedLibraries(QFrame* frame, dylibptr t, dylibptr p, dylibptr f); + SelectedLibraries(QFrame* frame, mem<ITracker> t, dylibptr p, mem<IFilter> f); SelectedLibraries() : pTracker(nullptr), pFilter(nullptr), pProtocol(nullptr), correct(false) {} ~SelectedLibraries(); bool correct; diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp index c124111f..e39e54dd 100644 --- a/opentrack/tracker.cpp +++ b/opentrack/tracker.cpp @@ -47,7 +47,7 @@ double Tracker::map(double pos, Mapping& axis) axis.curve.setTrackingActive( !altp ); axis.curveAlt.setTrackingActive( altp ); auto& fc = altp ? axis.curveAlt : axis.curve; - return fc.getValue(pos) + axis.opts.zero; + return fc.getValue(pos); } void Tracker::t_compensate(const rmat& rmat, const double* xyz, double* output, bool rz) |