Fixes#81758
DisplayServerWeb::process_joypads handles buttons 6 and 7 of the
HTML5 Standard Gamepad as a special case by doing:
`input->joy_axis(idx, (JoyAxis)b, s_btns[b]);`
This doesn't work because there is no JoyAxis 6 or 7 in the enum
To fix this we use JoyAxis::TRIGGER_LEFT and TRIGGER_RIGHT for button 6
and 7
However since we are now lying to input->joy_axis we also need to lie in
the mappings for the standard gamepad in godotcontrollersdb.txt,
otherwise input->joy_axis will try to find a mapping to axis 4(LT) and
axis 5(RT) that's not defined.
Therefore we set lefttrigger to +a4 and righttrigger to +a5 in the
mapping, to match what we are actually sending.
A cleaner, and more involved fix to this would be modifying
input->joy_button so that it can handle analog buttons and map them to
axes preserving their value instead of converting to boolean
(cherry picked from commit 9dd372f316)
The offending symbol gets stripped away by wasm-dce but it's used on the
JavaScript side and causes and undefined symbol which also causes the
closure compiler to throw an error.
As discussed with upstream, the C/C++ standard library is always fully
included when building with MAIN_MODULE=1, so using EMCC_FORCE_STDLIBS
is not necessary in our case.
Instead of calling loadDynamicLibraries ourselves, we add the
GDExtension libraries to preload to the "dynamicLibraries" module config
property.
This seems to fix some threading issue with some browsers during the
init phase.
SUPPORT_LONGJMP have changed since emscripten 3.1.32 to default to
"wasm" mode when exceptions are enabled, and "emscripten" mode when
disabled.
While we generally doesn't use exception in core, linked libraries may
need them, and emscripten don't plan to support WASM EH + Emscripten
SjLj in the long term.
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)
* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable