summaryrefslogtreecommitdiffhomepage
path: root/logic/state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/state.cpp')
-rw-r--r--logic/state.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/logic/state.cpp b/logic/state.cpp
index afdf5b12..dc5e5a36 100644
--- a/logic/state.cpp
+++ b/logic/state.cpp
@@ -1,5 +1,5 @@
#include "state.hpp"
-
+#include "opentrack/defs.hpp"
#include <iterator>
using dylib_ptr = Modules::dylib_ptr;
@@ -22,13 +22,19 @@ std::tuple<dylib_ptr, int> State::module_by_name(const QString& name, dylib_list
State::State(const QString& library_path) :
modules(library_path),
- ev(modules.extensions()),
- pose(s.all_axis_opts)
+ pose(s.all_axis_opts),
+ library_path{library_path}
{}
dylib_ptr State::current_tracker()
{
- auto [ptr, idx] = module_by_name(m.tracker_dll, modules.trackers());
+ const QString& module =
+#ifdef UI_FORCED_TRACKER
+ UI_FORCED_TRACKER;
+#else
+ m.tracker_dll;
+#endif
+ auto [ptr, idx] = module_by_name(module, modules.trackers());
return ptr;
}
@@ -40,6 +46,12 @@ dylib_ptr State::current_protocol()
dylib_ptr State::current_filter()
{
- auto [ptr, idx] = module_by_name(m.filter_dll, modules.filters());
+ const QString& module =
+#ifdef UI_FORCED_FILTER
+ UI_FORCED_FILTER;
+#else
+ m.filter_dll;
+#endif
+ auto [ptr, idx] = module_by_name(module, modules.filters());
return ptr;
}