Skip to content

Commit

Permalink
Fix up updates
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Feb 7, 2021
1 parent dd086e3 commit 1519d03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
18 changes: 5 additions & 13 deletions keyboards/ploopyco/mouse/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
#ifndef PLOOPY_DPI_DEFAULT
# define PLOOPY_DPI_DEFAULT 0
#endif
#ifndef PLOOPY_DRAGSCROLL_MOMENTARY
# define PLOOPY_DRAGSCROLL_MOMENTARY 0 // 0 -> Toggle, 1 -> Momentary
#endif
#ifndef PLOOPY_DRAGSCROLL_FIXED
# define PLOOPY_DRAGSCROLL_FIXED 0 // 0 -> Variable-DPI Drag Scroll, 1 -> Fixed-DPI Drag Scroll
#endif
#ifndef PLOOPY_DRAGSCROLL_DPI
# define PLOOPY_DRAGSCROLL_DPI 100 // Fixed-DPI Drag Scroll
#endif
Expand Down Expand Up @@ -179,15 +173,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
}

if (keycode == DRAG_SCROLL) {
#if PLOOPY_DRAGSCROLL_MOMENTARY==1
is_drag_scroll ^= 1;
#else
if (record->event.pressed) {
// this toggles the state each time you tap it
#ifndef PLOOPY_DRAGSCROLL_MOMENTARY
if (record->event.pressed)
#endif
{
is_drag_scroll ^= 1;
}
#endif
#if PLOOPY_DRAGSCROLL_FIXED==1
#ifdef PLOOPY_DRAGSCROLL_FIXED
pmw_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]);
#else
pmw_set_cpi(is_drag_scroll ? (dpi_array[keyboard_config.dpi_config] * PLOOPY_DRAGSCROLL_MULTIPLIER) : dpi_array[keyboard_config.dpi_config]);
Expand Down
18 changes: 5 additions & 13 deletions keyboards/ploopyco/trackball/trackball.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
#ifndef PLOOPY_DPI_DEFAULT
# define PLOOPY_DPI_DEFAULT 0
#endif
#ifndef PLOOPY_DRAGSCROLL_MOMENTARY
# define PLOOPY_DRAGSCROLL_MOMENTARY 0 // 0 -> Toggle, 1 -> Momentary
#endif
#ifndef PLOOPY_DRAGSCROLL_FIXED
# define PLOOPY_DRAGSCROLL_FIXED 0 // 0 -> Variable-DPI Drag Scroll, 1 -> Fixed-DPI Drag Scroll
#endif
#ifndef PLOOPY_DRAGSCROLL_DPI
# define PLOOPY_DRAGSCROLL_DPI 100 // Fixed-DPI Drag Scroll
#endif
Expand Down Expand Up @@ -179,15 +173,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
}

if (keycode == DRAG_SCROLL) {
#if PLOOPY_DRAGSCROLL_MOMENTARY==1
is_drag_scroll ^= 1;
#else
if (record->event.pressed) {
// this toggles the state each time you tap it
#ifndef PLOOPY_DRAGSCROLL_MOMENTARY
if (record->event.pressed)
#endif
{
is_drag_scroll ^= 1;
}
#endif
#if PLOOPY_DRAGSCROLL_FIXED==1
#ifdef PLOOPY_DRAGSCROLL_FIXED
pmw_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]);
#else
pmw_set_cpi(is_drag_scroll ? (dpi_array[keyboard_config.dpi_config] * PLOOPY_DRAGSCROLL_MULTIPLIER) : dpi_array[keyboard_config.dpi_config]);
Expand Down

0 comments on commit 1519d03

Please sign in to comment.