Skip to content

Commit

Permalink
PMW3360 DPI-bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wimads authored and burkfers committed Feb 19, 2024
1 parent 9b73d96 commit 24201fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions maccel/maccel.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ report_mouse_t pointing_device_task_maccel(report_mouse_t mouse_report) {
static uint16_t device_cpi = 300;
if (delta_time > 200) {
device_cpi = pointing_device_get_cpi();
#ifdef POINTING_DEVICE_DRIVER_pmw3360
// janky bug-fix for PMW3360
pointing_device_set_cpi(device_cpi);
#endif // POINTING_DEVICE_DRIVER_pmw3360
}
// calculate dpi correction factor (for normalizing velocity range across different user dpi settings)
const float dpi_correction = (float)100.0f / (DEVICE_CPI_PARAM * device_cpi);
Expand Down

0 comments on commit 24201fd

Please sign in to comment.