diff options
Diffstat (limited to 'platform/javascript')
-rw-r--r-- | platform/javascript/detect.py | 2 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 18 | ||||
-rw-r--r-- | platform/javascript/os_javascript.h | 1 |
3 files changed, 4 insertions, 17 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index f82eae9ff2..307e47e816 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -77,7 +77,7 @@ def configure(env): # retain function names at the cost of file size, for backtraces and profiling env.Append(LINKFLAGS=['--profiling-funcs']) elif (env["target"] == "debug"): - env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-Wall', '-g', '-DDEBUG_ENABLED']) + env.Append(CCFLAGS=['-O1', '-D_DEBUG', '-g', '-DDEBUG_ENABLED']) env.Append(LINKFLAGS=['-O1', '-g']) # TODO: Move that to opus module's config diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 83072c30aa..08c17e1e9c 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 Vector<TouchP //end all if exist InputEvent ev; ev.type = InputEvent::MOUSE_BUTTON; - ev.ID = last_id++; ev.mouse_button.button_index = BUTTON_LEFT; ev.mouse_button.button_mask = BUTTON_MASK_LEFT; ev.mouse_button.pressed = false; @@ -554,7 +552,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP InputEvent ev; ev.type = InputEvent::SCREEN_TOUCH; - ev.ID = last_id++; ev.screen_touch.index = touch[i].id; ev.screen_touch.pressed = false; ev.screen_touch.x = touch[i].pos.x; @@ -573,7 +570,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP //send mouse InputEvent ev; ev.type = InputEvent::MOUSE_BUTTON; - ev.ID = last_id++; ev.mouse_button.button_index = BUTTON_LEFT; ev.mouse_button.button_mask = BUTTON_MASK_LEFT; ev.mouse_button.pressed = true; @@ -590,7 +586,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP InputEvent ev; ev.type = InputEvent::SCREEN_TOUCH; - ev.ID = last_id++; ev.screen_touch.index = touch[i].id; ev.screen_touch.pressed = true; ev.screen_touch.x = touch[i].pos.x; @@ -605,7 +600,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP //send mouse, should look for point 0? InputEvent ev; ev.type = InputEvent::MOUSE_MOTION; - ev.ID = last_id++; ev.mouse_motion.button_mask = BUTTON_MASK_LEFT; ev.mouse_motion.x = p_points[0].pos.x; ev.mouse_motion.y = p_points[0].pos.y; @@ -638,7 +632,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP InputEvent ev; ev.type = InputEvent::SCREEN_DRAG; - ev.ID = last_id++; ev.screen_drag.index = touch[i].id; ev.screen_drag.x = p_points[idx].pos.x; ev.screen_drag.y = p_points[idx].pos.y; @@ -655,7 +648,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP //end all if exist InputEvent ev; ev.type = InputEvent::MOUSE_BUTTON; - ev.ID = last_id++; ev.mouse_button.button_index = BUTTON_LEFT; ev.mouse_button.button_mask = BUTTON_MASK_LEFT; ev.mouse_button.pressed = false; @@ -669,7 +661,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP InputEvent ev; ev.type = InputEvent::SCREEN_TOUCH; - ev.ID = last_id++; ev.screen_touch.index = touch[i].id; ev.screen_touch.pressed = false; ev.screen_touch.x = touch[i].pos.x; @@ -689,7 +680,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP InputEvent ev; ev.type = InputEvent::SCREEN_TOUCH; - ev.ID = last_id++; ev.screen_touch.index = tp.id; ev.screen_touch.pressed = true; ev.screen_touch.x = tp.pos.x; @@ -704,7 +694,6 @@ void OS_JavaScript::process_touch(int p_what, int p_pointer, const Vector<TouchP InputEvent ev; ev.type = InputEvent::SCREEN_TOUCH; - ev.ID = last_id++; ev.screen_touch.index = touch[i].id; ev.screen_touch.pressed = false; ev.screen_touch.x = touch[i].pos.x; @@ -790,9 +779,9 @@ void OS_JavaScript::process_joypads() { InputDefault::JoyAxis jx; jx.min = 0; jx.value = value; - last_id = input->joy_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; diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index b16918b2da..d21834b3dc 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -58,7 +58,6 @@ private: Vector<TouchPos> touch; Point2 last_mouse; int last_button_mask; - unsigned int last_id; GFXInitFunc gfx_init_func; void *gfx_init_ud; |