Commit graph

7 commits

Author SHA1 Message Date
Fabio Alessandrelli
470496d8d4 [HTML5] Fix multi-touch input handling.
The code to populate the input data for WebAssembly was incorrectly
overriding values when multiple touches were present due to wrong
indexing.
2021-11-30 11:10:21 +01:00
Fabio Alessandrelli
63e2db2499 [HTML5] Fix focus (again) in Firefox's iframes.
This actually makes sense(?), when running inside an iframe the active
element might be our canvas, while the iframe itself is not active in
the parent window. Since we consume the event, the iframe does not get
focused in Firefox (but does in Chromium-based browsers), so we must
always call focus to handle such occasions.
2021-11-26 09:44:00 +01:00
Fabio Alessandrelli
91dbc288cc [HTML5] Add checks to Gamepad API events.
In some conditions the events might be generated even when the `gamepad`
object is not accessible due to Security Context requirements.
This commit adds a check to avoid firing the handler in those cases.
2021-11-19 04:07:01 +01:00
Fabio Alessandrelli
f13c7fc83e [HTML5] Fix input not focusing canvas.
mousedown and touchstart should focus the canvas to ensure correct
application lifecycle.
2021-11-19 04:06:55 +01:00
Fabio Alessandrelli
68616edcbc [HTML5] Refactor JS library listeners to OS. 2021-10-05 14:15:07 +02:00
Fabio Alessandrelli
c494e442bc [HTML5] Refactor display/input JS library code. 2021-10-05 14:15:07 +02:00
Fabio Alessandrelli
b2d30c725d [HTML5] Implement mouse/touch/key events in JS library.
This makes us more independent from emscripten libraries, giving us more
control on the application lifecycle.
2021-10-05 14:15:07 +02:00