From c0b67568757ccc22811e16348713ef3119e18f3e Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Sun, 26 Mar 2017 15:59:13 +0200 Subject: Input: Remove usage of platform dependent event IDs. The ID property for InputEvents is set by `SceneTree` when sending the event down the tree. So there's no need for the platform specific code to set this value when it will later be overriden anyway... --- platform/javascript/os_javascript.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'platform/javascript/os_javascript.cpp') diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 83072c30a..08c17e1e9 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -520,7 +520,6 @@ void OS_JavaScript::main_loop_focusin() { 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)); } else if (ev.type == InputEvent::MOUSE_BUTTON) { @@ -540,7 +539,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vectorjoy_axis(last_id, i, j, jx); + input->joy_axis(i, j, jx); } else { - last_id = input->joy_button(last_id, i, j, value); + input->joy_button(i, j, value); } } for (int j = 0; j < num_axes; j++) { @@ -800,7 +789,7 @@ void OS_JavaScript::process_joypads() { InputDefault::JoyAxis jx; jx.min = -1; jx.value = state.axis[j]; - last_id = input->joy_axis(last_id, i, j, jx); + input->joy_axis(i, j, jx); } } } @@ -844,7 +833,6 @@ OS_JavaScript::OS_JavaScript(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, G gfx_init_ud = p_gfx_init_ud; last_button_mask = 0; main_loop = NULL; - last_id = 1; gl_extensions = NULL; window_maximized = false; -- cgit v1.2.3-70-g09d2