diff options
-rw-r--r-- | logic/state.cpp | 18 | ||||
-rw-r--r-- | opentrack/defs.hpp | 13 | ||||
-rw-r--r-- | opentrack/main-window.cpp | 2 |
3 files changed, 29 insertions, 4 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; } diff --git a/opentrack/defs.hpp b/opentrack/defs.hpp new file mode 100644 index 00000000..01b6557f --- /dev/null +++ b/opentrack/defs.hpp @@ -0,0 +1,13 @@ +#pragma once + +//#define UI_FORCED_TRACKER "pt" +//#define UI_FORCED_FILTER "accela" + +//#define UI_NO_TRACKER_COMBOBOX +//#define UI_NO_FILTER_COMBOBOX + +//#define UI_NO_TRACKER_SETTINGS_BUTTON +//#define UI_NO_FILTER_SETTINGS_BUTTON + +//#define UI_NO_RAW_DATA +//#define UI_NO_GAME_DATA diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp index ac20c7de..e81299d7 100644 --- a/opentrack/main-window.cpp +++ b/opentrack/main-window.cpp @@ -17,8 +17,8 @@ #include "compat/library-path.hpp" #include "compat/math.hpp" #include "compat/sysexits.hpp" +#include "opentrack/defs.hpp" -#include <algorithm> #include <utility> #include <QMessageBox> |