ing regular mouse mode now resets warping

pull/18/head
Jesse Vincent 11 years ago
parent fc382b507e
commit 6a06b6ff36

@ -47,7 +47,9 @@ void report_matrix();
double mouse_accel (double cycles); double mouse_accel (double cycles);
void handle_mouse_movement( char x, char y); void handle_mouse_movement( char x, char y);
void begin_warping();
void end_warping();
void warp_mouse(Key key);
// hardware keymap interaction // hardware keymap interaction
void setup_pins(); void setup_pins();

@ -306,10 +306,13 @@ void begin_warping() {
section_top = abs_top; section_top = abs_top;
next_width = 32767; next_width = 32767;
next_height = 32767; next_height = 32767;
Serial.print ("just reset the warp");
is_warping = true; is_warping = true;
} }
void end_warping() {
is_warping= false;
}
void warp_mouse(Key ninth) { void warp_mouse(Key ninth) {
if (is_warping == false) { if (is_warping == false) {
begin_warping(); begin_warping();
@ -317,9 +320,7 @@ void warp_mouse(Key ninth) {
if ( ninth.rawKey & MOUSE_END_WARP) { if ( ninth.rawKey & MOUSE_END_WARP) {
Serial.print ("done warping"); end_warping();
is_warping = false;
return; return;
} }
next_width = next_width / 2; next_width = next_width / 2;
@ -437,6 +438,9 @@ void handle_mouse_movement( char x, char y)
Serial.print(" carriedOverY is "); Serial.print(" carriedOverY is ");
Serial.println(carriedOverY); Serial.println(carriedOverY);
#endif #endif
end_warping();
Mouse.move(moveX, moveY, 0); Mouse.move(moveX, moveY, 0);
} else { } else {
mouseActiveForCycles = 0; mouseActiveForCycles = 0;
@ -448,6 +452,7 @@ void handle_mouse_movement( char x, char y)
// //
// Key Reports // Key Reports
// //
void release_keys_not_being_pressed() void release_keys_not_being_pressed()
{ {
// we use charsReportedLastTime to figure out what we might // we use charsReportedLastTime to figure out what we might

Loading…
Cancel
Save