summaryrefslogtreecommitdiff
path: root/common/rawaccel.hpp
diff options
context:
space:
mode:
authora1xd <[email protected]>2021-09-06 19:11:47 -0400
committera1xd <[email protected]>2021-09-23 22:28:44 -0400
commit8680805b267bf5280b8f446ed33ef07981ea5475 (patch)
treeccf8f2cd368a5f6d1d87fb23934218946ff6e388 /common/rawaccel.hpp
parentchange lookup impl to use binary search (diff)
downloadrawaccel-8680805b267bf5280b8f446ed33ef07981ea5475.tar.xz
rawaccel-8680805b267bf5280b8f446ed33ef07981ea5475.zip
make profile count dynamic (unlimited)
Diffstat (limited to 'common/rawaccel.hpp')
-rw-r--r--common/rawaccel.hpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp
index b7e632b..c7bf33d 100644
--- a/common/rawaccel.hpp
+++ b/common/rawaccel.hpp
@@ -48,17 +48,14 @@ namespace rawaccel {
settings.data.rot_direction = direction(settings.prof.degrees_rotation);
}
- inline constexpr unsigned DRIVER_CAPACITY = POOL_SIZE / sizeof(driver_settings);
- inline constexpr unsigned DEVICE_CAPACITY = POOL_SIZE / sizeof(device_settings);
-
- struct io_t {
+ struct io_base {
device_config default_dev_cfg;
- unsigned driver_data_size;
- unsigned device_data_size;
- driver_settings driver_data[DRIVER_CAPACITY];
- device_settings device_data[DEVICE_CAPACITY];
+ unsigned driver_data_size = 0;
+ unsigned device_data_size = 0;
};
+ static_assert(alignof(io_base) == alignof(driver_settings) && alignof(driver_settings) == alignof(device_settings));
+
class modifier {
public:
#ifdef _KERNEL_MODE