Fix relative mouse motion when captured in HTML5 platform

(cherry picked from commit d78b10313b)
This commit is contained in:
Leon Krause 2018-05-09 16:00:46 +02:00 committed by Hein-Pieter van Braam
parent 2fa54c1df6
commit 66c0be642f

View file

@ -196,7 +196,7 @@ static EM_BOOL _mousemove_callback(int event_type, const EmscriptenMouseEvent *m
ev->set_position(pos); ev->set_position(pos);
ev->set_global_position(ev->get_position()); ev->set_global_position(ev->get_position());
ev->set_relative(ev->get_position() - _input->get_mouse_position()); ev->set_relative(Vector2(mouse_event->movementX, mouse_event->movementY));
_input->set_mouse_position(ev->get_position()); _input->set_mouse_position(ev->get_position());
ev->set_speed(_input->get_last_mouse_speed()); ev->set_speed(_input->get_last_mouse_speed());