From b56a99770fbd027cf991b271a6781ced77f8b9fe Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 22 May 2025 09:36:02 +0800 Subject: [PATCH] feat: mouse accel option --- src/config/parse_config.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/config/parse_config.h b/src/config/parse_config.h index 3939830..56914e7 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -165,6 +165,8 @@ typedef struct { int disable_while_typing; int left_handed; int middle_button_emulation; + unsigned int accel_profile; + double accel_speed; int smartgaps; unsigned int gappih; @@ -939,6 +941,10 @@ void parse_config_line(Config *config, const char *line) { config->left_handed = atoi(value); } else if (strcmp(key, "middle_button_emulation") == 0) { config->middle_button_emulation = atoi(value); + } else if (strcmp(key, "accel_profile") == 0) { + config->accel_profile = atoi(value); + } else if (strcmp(key, "accel_speed") == 0) { + config->accel_speed = atof(value); } else if (strcmp(key, "gappih") == 0) { config->gappih = atoi(value); } else if (strcmp(key, "gappiv") == 0) { @@ -1804,6 +1810,8 @@ void override_config(void) { disable_while_typing = config.disable_while_typing; left_handed = config.left_handed; middle_button_emulation = config.middle_button_emulation; + accel_profile = config.accel_profile; + accel_speed = config.accel_speed; // 复制颜色数组 memcpy(rootcolor, config.rootcolor, sizeof(rootcolor)); @@ -1897,6 +1905,8 @@ void set_value_default() { config.disable_while_typing = disable_while_typing; config.left_handed = left_handed; config.middle_button_emulation = middle_button_emulation; + config.accel_profile = accel_profile; + config.accel_speed = accel_speed; memcpy(config.animation_curve_move, animation_curve_move, sizeof(animation_curve_move));