Skip to content

Commit

Permalink
PM modes reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
freznel10 committed Jan 25, 2023
1 parent d8e0254 commit 3bfdb5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions keyboards/zerfstudios/douballz/douballz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion keyboards/zerfstudios/douballz/ui/bindings/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 4 additions & 4 deletions keyboards/zerfstudios/douballz/ui/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3bfdb5b

Please sign in to comment.