]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/mousekey.c
Diagonal micro move fix
[qmk_firmware.git] / tmk_core / common / mousekey.c
index aa128f0e87dd17eea205f6518ef0f5a9deb3def0..581e7b8a07250c4dd10f2dabab7b647cc2b92051 100644 (file)
@@ -122,7 +122,9 @@ void mousekey_task(void)
     /* diagonal move [1/sqrt(2)] */
     if (mouse_report.x && mouse_report.y) {
         mouse_report.x = times_inv_sqrt2(mouse_report.x);
+        mouse_report.x = mouse_report.x == 0 ? 1 : mouse_report.x;
         mouse_report.y = times_inv_sqrt2(mouse_report.y);
+        mouse_report.y = mouse_report.y == 0 ? 1 : mouse_report.y;
     }
 
     if (mouse_report.v > 0) mouse_report.v = wheel_unit();