Merge pull request #5601 from eska014/emscripten-mouse-pos

Fix Input singleton mouse position in web export
This commit is contained in:
Rémi Verschelde 2016-07-08 21:26:30 +02:00 committed by GitHub
commit 78601c8434

View file

@ -415,6 +415,9 @@ void OS_JavaScript::push_input(const InputEvent& p_ev) {
InputEvent ev = p_ev;
ev.ID=last_id++;
if (ev.type==InputEvent::MOUSE_MOTION) {
input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
}
input->parse_input_event(p_ev);
}