Commit Graph

10 Commits

Author SHA1 Message Date
Fabio Alessandrelli 82c83a0636
[HTML5] Fix gamepad samples not being properly reset.
(cherry picked from commit 93968e1451)
2022-01-31 22:54:24 +01:00
Rémi Verschelde a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Luis Sanchez e00d20aa5a
Fix files_dropped in HTML5 export.
(Ignore trailing slash when creating the temporary directory)

(cherry picked from commit 40f26cb260)
2021-12-09 12:05:44 +01:00
Fabio Alessandrelli 53ce3f64ad
[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.

(cherry picked from commit 470496d8d4)
2021-11-30 12:20:19 +01:00
Fabio Alessandrelli f11bed249b
[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.

(cherry picked from commit 63e2db2499)
2021-11-26 10:42:56 +01:00
Fabio Alessandrelli f56b1a5af5
[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.

(cherry picked from commit 91dbc288cc)
2021-11-20 11:46:13 +01:00
Fabio Alessandrelli 1066b60781
[HTML5] Fix input not focusing canvas.
mousedown and touchstart should focus the canvas to ensure correct
application lifecycle.

(cherry picked from commit f13c7fc83e)
2021-11-20 11:46:09 +01:00
Fabio Alessandrelli d61fc468a2 [HTML5] Refactor JS library listeners to OS. 2021-10-05 15:13:41 +02:00
Fabio Alessandrelli 5e2e54a4b4 [HTML5] Refactor display/input JS library code. 2021-10-05 15:13:41 +02:00
Fabio Alessandrelli b7ac3c1aeb [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 15:13:41 +02:00