diff options
Diffstat (limited to 'keyboards/ploopyco/trackball/trackball.c')
-rw-r--r-- | keyboards/ploopyco/trackball/trackball.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c index b9c29b54e..719020997 100644 --- a/keyboards/ploopyco/trackball/trackball.c +++ b/keyboards/ploopyco/trackball/trackball.c | |||
@@ -246,7 +246,6 @@ void pointing_device_init(void) { | |||
246 | opt_encoder_init(); | 246 | opt_encoder_init(); |
247 | } | 247 | } |
248 | 248 | ||
249 | bool has_report_changed(report_mouse_t new, report_mouse_t old) { return (new.buttons != old.buttons) || (new.x && new.x != old.x) || (new.y && new.y != old.y) || (new.h && new.h != old.h) || (new.v && new.v != old.v); } | ||
250 | 249 | ||
251 | void pointing_device_task(void) { | 250 | void pointing_device_task(void) { |
252 | report_mouse_t mouse_report = pointing_device_get_report(); | 251 | report_mouse_t mouse_report = pointing_device_get_report(); |
@@ -269,27 +268,10 @@ void pointing_device_task(void) { | |||
269 | pointing_device_send(); | 268 | pointing_device_send(); |
270 | } | 269 | } |
271 | 270 | ||
272 | void pointing_device_send(void) { | ||
273 | static report_mouse_t old_report = {}; | ||
274 | report_mouse_t mouseReport = pointing_device_get_report(); | ||
275 | |||
276 | // If you need to do other things, like debugging, this is the place to do it. | ||
277 | if (has_report_changed(mouseReport, old_report)) { | ||
278 | host_mouse_send(&mouseReport); | ||
279 | } | ||
280 | |||
281 | // send it and 0 it out except for buttons, so those stay until they are explicity over-ridden using update_pointing_device | ||
282 | mouseReport.x = 0; | ||
283 | mouseReport.y = 0; | ||
284 | mouseReport.v = 0; | ||
285 | mouseReport.h = 0; | ||
286 | pointing_device_set_report(mouseReport); | ||
287 | old_report = mouseReport; | ||
288 | } | ||
289 | |||
290 | void eeconfig_init_kb(void) { | 271 | void eeconfig_init_kb(void) { |
291 | keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; | 272 | keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; |
292 | eeconfig_update_kb(keyboard_config.raw); | 273 | eeconfig_update_kb(keyboard_config.raw); |
274 | eeconfig_init_user(); | ||
293 | } | 275 | } |
294 | 276 | ||
295 | void matrix_init_kb(void) { | 277 | void matrix_init_kb(void) { |