equal
deleted
inserted
replaced
460 event.mouse.x = sdl_event.motion.x / _screen.get_cell_width(); |
460 event.mouse.x = sdl_event.motion.x / _screen.get_cell_width(); |
461 event.mouse.y = sdl_event.motion.y / _screen.get_cell_height(); |
461 event.mouse.y = sdl_event.motion.y / _screen.get_cell_height(); |
462 if (_mousemove_last_x != event.mouse.x || |
462 if (_mousemove_last_x != event.mouse.x || |
463 _mousemove_last_y != event.mouse.y) |
463 _mousemove_last_y != event.mouse.y) |
464 { |
464 { |
|
465 if (_mousemove_last_x != -1) |
|
466 { |
|
467 event.mouse.relx = event.mouse.x - _mousemove_last_x; |
|
468 event.mouse.rely = event.mouse.y - _mousemove_last_y; |
|
469 event_ready = true; |
|
470 } |
465 _mousemove_last_x = event.mouse.x; |
471 _mousemove_last_x = event.mouse.x; |
466 _mousemove_last_y = event.mouse.y; |
472 _mousemove_last_y = event.mouse.y; |
467 event_ready = true; |
|
468 break; |
473 break; |
469 } |
474 } |
470 break; // continue loop when mouse position did not change |
475 break; // continue loop when mouse position did not change |
471 |
476 |
472 default: |
477 default: |