Performances are not great in general, bad on Firefox, on Chrome, well,
it could be an improvement. Leave it as a fallback for now, but can be
forced via project settings if desired (or custom JavaScript logic via
the "args" option).
I'm actually surprised this works, it involves so many allocations, but
there's no way around it when SharedArrayBuffer is not available :(.
This only adds support for a subset of Play Asset Delivery: this causes a single install-time asset pack to always be present, but doesn't add support for dynamically downloaded asset packs.
Browsers doesn't really like forcing the mix rate, e.g. Firefox does not
allow input (microphone) if the mix rate is not the default one, Chrom*
will exhibit worse performances, etc.
This provides better security at the cost of having misleading
binary icons on some file managers.
Now that recent Linux distributions no longer allow executing
binaries by double-clicking them in a file manager (even if the
binary is set to be executable), the usability cost of PIE is lowered.
You have to use a terminal or install a `.desktop` file nowadays.
After input buffering was reworked, input accumulation is now handled
outside of OS, and the JavaScript plaform never implemented that.
Additionally, the JavaScript platform is quite obnoxious about calling
specific APIs outside specific user triggered events.
This commit adds event flushing during the main iteration, and forces it
during keydown/keyup/mousedown/mouseup/touchstart/touchend/touchcanel
events (effectively only accumulating only "move" events).
Doesn't change the default behavior, but allows plugins to add their
view behind the main view, which gives more control over what happens
with inputs and can be useful along with transparent rendering.
- Don't display messages when enabling PulseAudio/ALSA/D-Bus/udev
as these become noisy in incremental builds.
- Improve warning and error messages to be more descriptive
and consistent.
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
This makes for easier organization since downloading a project
several times (or several different projects) will result in more
meaningful file names.
This prevents the D-pad up arrow from being registered as pressed
when it isn't, and pressing any direction from activating the next
arrow clockwise of it.
Co-authored-by: Scott Wadden <scott.wadden@gmail.com>
Key, touch and joystick events will be passed directly from the UI thread to Godot, so they can benefit from agile input flushing.
As another consequence of this new way of passing events, less Java object are created at runtime (`Runnable`), which is good since the garbage collector needs to run less.
`AndroidInputHandler` is introduced to have a smaller cross-thread surface. `main_loop_request_go_back()` is removed in favor just inline calling `send_window_event()` at the most caller's convenience (i.e., leveraging the new `p_deferred`` parameter as appropriate).
Lastly, `get_mouse_position()` and `get_mouse_button_state()` now just call through `Input` to avoid the need of sync of mouse data tracked on the UI thread.