When triggering buttons on the virtual gamepad, the down and up events
are sent on release. That's a leftover from the previous virtual gamepad
which didn't allow to select the buttons easily.
On the new virtual gamepad, the button choice is better so we can
trigger a button down as soon as the finger is on it.
This fixes a bug in some AGS games which missed the button press because
the release was sent too soon.
Fixes Trac#15444.
The JNI global references are limited in count and we overflow it for
games with a huge number of files (like Zork Nemesis).
Instead, track all the nodes from Java side using a unique identifier
generated using an atomic counter.
Then, all JNI calls either use a temporary local reference to access
node data or use the unique identifier.
Android libc (Bionic) had a bug in their memchr function where the
needle wasn't considered as an unsigned char for Android below 6.0
except for aarch64 where the implementation was in assembly and behaves
correctly.
This means that on every impacted platform, passing a needle made of a
char >= 0x80 makes memchr never find a match because the value is signed
extended.
Make sure we avoid this case by forcing a cast to unsigned char before
passing an int.
It builds a fat AAB for Google Play submission and several slim APKs for
the website.
It also uses the proper flags for configure and handles games bundling.
This bundle contains all architectures.
To build it, a base architecture must be configured and the build
process will invoke the make process for all other architectures in
different subfolders.
Then, the bundle will be made with all libraries merged in the base
build directory.
This should make the code future proof.
With this flag enabled, the KEYCODE_BACK event is never sent through
the onKey callback but using a dedicated callback.
When a hardware keybaord is present, Android may display the IME
dependng on a (secure) user setting.
Even if this setting is not documented, as it's here since 2014, it
seems quite safe to use.
In addition, long pressing the input method icon will forcibly display
the soft keyboard even if a HW keyboard is present.
More guards were added to hopefully link the mouse down and up events that should be executed in sequence, albeit delayed
Also a new case was added for a delayed mouse up event (in JE_MULTI) to avoid it being executed out of order / too soon.
Stopping throws an exception when the audio track is not initialized.
Releasing is what we want: it stops the track, ignores the error and do
more cleanups.
- Use a SVG asset to allow for better scalability
- Make the controller visible when touching the screen
- Allow for oblique moving by placing finger between two directions
- Add more buttons on the center area of the screen (GUIDE, START, LEFT
STICK, RIGHT STICK) and simplify right area (only four buttons)
- Don't track all fingers, only the ones needed
- Cleanup now unused code
This allows users to fast recall the last games with a long press on the
launcher icon.
This also allows users to pin these shortcuts without having to go by
the widgets selector (which is not implemented in some launchers).