From 3bfdb5ba1df1471cee63d96b4c354f059efcbedf Mon Sep 17 00:00:00 2001 From: freznel10 Date: Wed, 25 Jan 2023 11:18:35 +0800 Subject: [PATCH] PM modes reorder --- keyboards/zerfstudios/douballz/douballz.c | 8 ++++---- keyboards/zerfstudios/douballz/ui/bindings/bindings.c | 2 +- keyboards/zerfstudios/douballz/ui/ui.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/zerfstudios/douballz/douballz.c b/keyboards/zerfstudios/douballz/douballz.c index d28479981a9d..1937cbfe1638 100644 --- a/keyboards/zerfstudios/douballz/douballz.c +++ b/keyboards/zerfstudios/douballz/douballz.c @@ -123,10 +123,10 @@ static uint16_t get_pointer_sniping_dpi(charybdis_config_t* config) { return (ui /** \brief Set the appropriate DPI for the input config. */ static void maybe_update_pointing_device_cpi(charybdis_config_t* config) { if (is_keyboard_left()) { - if (user_state.split_pointing_mode == 1) { + if (user_state.split_pointing_mode == PM_DRAG) { pointing_device_set_cpi_on_side(true, CHARYBDIS_DRAGSCROLL_DPI); pointing_device_set_cpi_on_side(false, CHARYBDIS_DRAGSCROLL_DPI); - } else if (user_state.split_pointing_mode == 2) { + } else if (user_state.split_pointing_mode == PM_PRECISION) { pointing_device_set_cpi_on_side(true,get_pointer_sniping_dpi(config)); pointing_device_set_cpi_on_side(false,get_pointer_sniping_dpi(config)); dprintf("testing"); @@ -135,10 +135,10 @@ static void maybe_update_pointing_device_cpi(charybdis_config_t* config) { pointing_device_set_cpi_on_side(false, get_pointer_default_dpi(config)); } } else { - if (user_state.split_pointing_mode == 1) { + if (user_state.split_pointing_mode == PM_DRAG) { pointing_device_set_cpi_on_side(true, CHARYBDIS_DRAGSCROLL_DPI); pointing_device_set_cpi(CHARYBDIS_DRAGSCROLL_DPI); - } else if (user_state.split_pointing_mode == 2) { + } else if (user_state.split_pointing_mode == PM_PRECISION) { pointing_device_set_cpi_on_side(true,get_pointer_sniping_dpi(config)); pointing_device_set_cpi(get_pointer_sniping_dpi(config)); } else { diff --git a/keyboards/zerfstudios/douballz/ui/bindings/bindings.c b/keyboards/zerfstudios/douballz/ui/bindings/bindings.c index f910c4e86c97..41234c5109a9 100644 --- a/keyboards/zerfstudios/douballz/ui/bindings/bindings.c +++ b/keyboards/zerfstudios/douballz/ui/bindings/bindings.c @@ -101,6 +101,6 @@ uint8_t qmk_lv_active_layer(void) { uint16_t qmk_lv_get_cpi(void) { uint16_t cpi = 0; - cpi = user_state.split_pointing_mode == 2 ? charybdis_get_pointer_sniping_dpi() : charybdis_get_pointer_default_dpi(); + cpi = user_state.split_pointing_mode == PM_PRECISION ? charybdis_get_pointer_sniping_dpi() : charybdis_get_pointer_default_dpi(); return cpi; } diff --git a/keyboards/zerfstudios/douballz/ui/ui.c b/keyboards/zerfstudios/douballz/ui/ui.c index 6dd6453968aa..601a4366814f 100644 --- a/keyboards/zerfstudios/douballz/ui/ui.c +++ b/keyboards/zerfstudios/douballz/ui/ui.c @@ -602,12 +602,12 @@ void set_pm_text_value(lv_obj_t* lbl) { char buf[32]; const char *pm_name = "-----"; switch (user_state.split_pointing_mode) { - case 1: - pm_name = "DRAGSCROLL"; - break; - case 2: + case PM_PRECISION: pm_name = "PRECISION"; break; + case PM_DRAG: + pm_name = "PM_DRAG"; + break; case 3: pm_name = "CARET"; break;