summaryrefslogtreecommitdiffhomepage
path: root/logic/state.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-19 16:44:21 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-19 16:44:21 +0100
commitb9a3909834826f035e639a196cc0f8cf7e20ca55 (patch)
treeba7f9229f57963d6c5e9cbd029bf8f7422dddb9f /logic/state.cpp
parentcc9ef300857255d84efef60868448c6765d3ccff (diff)
opentrack: #define to force particular module, overriding .ini
Diffstat (limited to 'logic/state.cpp')
-rw-r--r--logic/state.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/logic/state.cpp b/logic/state.cpp
index afdf5b12..357430d8 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;
@@ -28,7 +28,13 @@ State::State(const QString& 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;
}