From 5b659e1cfbc4b8fbbd2f2bf41dc716929976c77d Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Sat, 28 Aug 2021 01:19:18 -0400 Subject: add per-device configuration adds input and [in, out] cap for classic mode adds input cap for power mode change wrapper/input, now gets useful device names change (now dev specific) dpi to adjust sensitivity change y sensitivity to y/x ratio remove spaced LUTs grapher and convert do not build --- common/accel-invoke.hpp | 52 ------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 common/accel-invoke.hpp (limited to 'common/accel-invoke.hpp') diff --git a/common/accel-invoke.hpp b/common/accel-invoke.hpp deleted file mode 100644 index f2a95dc..0000000 --- a/common/accel-invoke.hpp +++ /dev/null @@ -1,52 +0,0 @@ -#pragma once - -#include "accel-union.hpp" - -namespace rawaccel { - - class accel_invoker { - using callback_t = double (*)(const accel_union&, double, double); - - callback_t cb = &invoke_impl; - - template - static double invoke_impl(const accel_union& u, double x, double w) - { - return apply_weighted(reinterpret_cast(u), x, w); - } - - public: - - accel_invoker(const accel_args& args) - { - cb = visit_accel([](auto&& arg) { - using T = remove_ref_t; - - if constexpr (is_same_v) { - static_assert(sizeof motivity == sizeof binlog_lut); - return &invoke_impl; - } - else { - return &invoke_impl; - } - - }, make_mode(args), accel_union{}); - } - - accel_invoker() = default; - - double invoke(const accel_union& u, double x, double weight = 1) const - { - return (*cb)(u, x, weight); - } - }; - - inline vec2 invokers(const settings& args) - { - return { - accel_invoker(args.argsv.x), - accel_invoker(args.argsv.y) - }; - } - -} -- cgit v1.2.3