Commit Graph
526 Commits
Author SHA1 Message Date
Le Philousophe caa7e5c8df ALL: Add limits for all codebase 2023-06-06 08:14:25 +02:00
antoniou79 135cd721c5 ANDROID: Prevent getPath() when getExternalFilesDir(null) returns null
According to documentation getExternalFilesDir returns the absolute path to application-specific directory

May return null if shared storage is not currently available.
This will not happen for getFilesDir() which returns the internal app path (always guaranteed to be available)
2023-04-23 13:36:53 +03:00
Antoniou Athanasios 12c5b7bb2b ANDROID: Improve support for gamepads and joysticks
Detect motion on DPAD (HATs), and on right stick as separately from the left stick

Also detect left and right trigger presses (when available)
2023-04-04 22:16:24 +03:00
antoniou79 64797234e6 ANDROID: Add Control tab for mouse pointer speed
and joystick deadzone. By supporting kFeatureKbdMouseSpeed and kFeatureJoystickDeadzone and registering default values

Both of these config settings (kbdmouse_speed, joystick_deadzone) factor in virtual mouse movement.

Helps handle virtual mouse pointer speed when controlled with DPAD or is too fast for the user
2023-04-02 21:55:56 +03:00
Le Philousophe ecc050e83c ANDROID: Bundle cacert.pem and don't disable certificate checks 2023-04-02 11:39:44 +02:00
antoniou79 d813908b54 ANDROID: Support physical mouse wheel up-down
Tested and works with physical mouse but does not work with Android Studio emulated device
2023-04-02 00:50:00 +03:00
antoniou79 7d6a1fcbaa ANDROID: Treat DPAD keypresses as JOYSTICK_DPAD
Mapped by default to virtual mouse movement
2023-03-31 23:13:16 +03:00
antoniou79 42991838c5 ANDROID: Comments on Android storage
And a minor comment fix
2023-03-27 14:12:09 +03:00
antoniou79 ab2df113e3 ANDROID: Remove redundant exceptions and comments 2023-03-26 14:03:09 +03:00
Antoniou Athanasios 8ce6a32ac2 ANDROID: Clean up log code and use Backends::Log 2023-03-26 12:05:12 +03:00
Antoniou Athanasios fb673553ce ANDROID: Write to a scummvm.log file 2023-03-25 23:23:12 +02:00
Le Philousophe 00e3208dd6 ANDROID: Fix GLES2 functions loading with EGL 1.4
With older EGL 1.4, functions from core OpenGL may not be resolved using
eglGetProcAddress. A fallback to dlsym is needed.
We still use eglGetProcAddress only on EGL 1.5+ because it is simpler
and faster.
2023-03-25 13:17:23 +01:00
antoniou79 057709fffb ANDROID: Basic support for some TV remotes
And some fixes for DPAD handling

More fixes for DPAD will be coming. We currently don't handle DPAD Center, and also do not handle the case where DPAD is HATs (motion events)
2023-03-25 00:03:47 +02:00
antoniou79 d6b2f6850a ANDROID: Revert "ANDROID: Support FireTV remote"
This reverts commit 16f626401e

It was accidentally pushed, while not being ready yet.
2023-03-22 22:19:58 +02:00
antoniou79 cd8a40487f ANDROID: Fix another deprecated Handler() usage 2023-03-22 22:04:42 +02:00
Antoniou Athanasios 16f626401e ANDROID: Support FireTV remote 2023-03-22 21:46:48 +02:00
Le Philousophe d97d89dc27 ANDROID: Fix onDestroy cleanup
onDestroy could never work before as it was sending a quit event to a
paused C++ code.
Make sure C++ code is unpaused.
In addition don't call finish in termination callback if finish was
responsibile of the termination. Else, finish events get queued in
Android and a new ScummVMActivity gets killed immediately.
2023-03-18 12:01:05 +01:00
Le Philousophe 113100ded2 ANDROID: Allow to set same pause status from Java several times 2023-03-18 12:01:05 +01:00
antoniou79 aaef1c26a3 ANDROID: Fix deprecated Handler()
Also remove permission request for external storage from API 33 and above since it no longer works
2023-03-12 22:44:29 +02:00
Le Philousophe 528378a560 ANDROID: Fix RequiresApi annotations
These have been checked with Android linter and are not necessary.
setMarginEnd is only available starting with L_MR1 and is not useful.
2023-03-11 18:19:54 +01:00
Le Philousophe bc89781445 ANDROID: Use SAF only with Nougat
Lollipop doesn't have some functions like removeDocument and isTreeUri.
SAF is slower and doesn't need to be enabled on Lollipop devices.
2023-03-11 18:19:54 +01:00
Le Philousophe 8e7b8effa3 ANDROID: Rewrite cache to make it more efficient
Instead of caching path string, cache nodes and their children.
This allows a better tracking of what is in cache and what is not.

Use SoftReference to allow for simple cleanup and ensure we have unique
SAFFSNode instances.
2023-03-04 18:16:20 +01:00
Le Philousophe fef1f73758 ANDROID: Fix missing format call
This was calling String(const char *beginP, const char *endP) instead of
formatting the string.
2023-03-04 11:21:48 +01:00
Le Philousophe e1d9921293 ANDROID: Make Android onCreate more readable
The else clause was not necessary.
2023-03-01 19:00:01 +02:00
Le Philousophe 8d83dac31e ANDROID: Simplify Android startup
Do not pass arguments to the process but customize the backend instead
2023-03-01 19:00:01 +02:00
Le Philousophe 2c089c4ed3 ANDROID: Don't directly use remove() for save files
Use our brand new remove feature in filesystem
2023-02-28 19:12:11 +02:00
Le Philousophe 075c3f4246 ANDROID: Add remove feature to Android filesystem abstraction 2023-02-28 19:12:11 +02:00
Le Philousophe ba4694fc3e ANDROID: Factorize SAF flags computation 2023-02-28 19:12:11 +02:00
Antoniou Athanasios ca8b77e341 ANDROID: Create and Register default path for icons 2023-02-26 20:10:21 +02:00
antoniou79 47e4f1e9f4 ANDROID: Do not set global save path as launch param 2023-02-26 20:10:21 +02:00
Le Philousophe 3b3f88cfbf ANDROID: Don't override gDebugLevel 2023-02-12 20:33:19 +01:00
Le Philousophe a8692ebf13 ANDROID: Make SAF strings translatable and better looking 2023-02-12 17:54:45 +01:00
Le Philousophe baf42ae7e6 ANDROID: Add a dialog to revoke SAF authorizations
Remove old all-in-one revoke authorizations process
2023-01-20 14:14:03 +01:00
Le Philousophe f78e79fd4f ANDROID: Clear SAF cache when activity is hidden
This allows to refresh when user changed the folders behind ScummVM back
2023-01-20 14:14:03 +01:00
Le Philousophe a465718c24 ANDROID: Fix comment
For coherence sake
2023-01-20 14:14:03 +01:00
Le Philousophe ca1dbfc9d6 ANDROID: Add SAF support 2023-01-20 14:14:03 +01:00
Le Philousophe c60ad0a554 ANDROID: Various cleanups in JNI
Mostly fixing memory leaks (Java references).
No need to preinit semaphore (sem_init is called).
First initialize methods ID before starting anything.
Aborts if a method is not found.
2023-01-20 14:14:03 +01:00
Le Philousopheandantoniou79 9631567923 ANDROID: Add a method to get running SDK version
Co-authored-by: antoniou79 <a.antoniou79@gmail.com>
2023-01-20 14:14:03 +01:00
Le Philousophe e17b34c9dc ANDROID: Store JNI environment in a thread local variable
This avoids to query JVM every time we need to do a JNI call.
A different environment is attached to each thread, hence the TLS
variable.
2023-01-20 14:14:03 +01:00
Rudis Muiznieks 930028522e ANDROID: Simplify Joystick axis scaling
The scaling of Joystick axis values has been moved to the Java event
handler.
2022-12-19 00:36:51 +00:00
Rudis Muiznieks c33a65e32b ANDROID: Map Joystick inputs to Joystick events
Previously joystick motion inputs were being translated to direct mouse
movement events. This changes those into Joystick AXIS events instead.
Also updates joystick button inputs into joystick button events instead
of mouse clicks and key presses.
2022-12-19 00:36:51 +00:00
Rudis Muiznieks fb9416eacb ANDROID: Map gamepad inputs to joystick events
Previously most buttons were being ignored and A and B were mapped to
mouse clicks. This maps A and B and several more buttons to Joypad
button presses instead.
2022-12-19 00:36:51 +00:00
Cameron Cawley 9f4f22b3bf AUDIO: Support mono audio output in the mixer 2022-11-18 17:17:00 +01:00
Hubert Maier a10cbd3199 BACKENDS: Correct spelling mistake
occured -> occurred
2022-10-27 15:56:04 +02:00
jacobhyman 6931714c2f ANDROID: Fix touchscreen stylus check 2022-10-23 19:33:21 +02:00
Le Philousophe 111d259015 ALL: Add limits.h for all codebase 2022-08-22 15:38:10 +02:00
Le Philousophe a0f02d93c5 JANITORIAL: Refresh all portdefs
Make sure all needed includes are really included
2022-08-22 15:38:10 +02:00
Donovan Watteau 27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
Le Philousophe 4ab044a254 OPENGL: Merge both OpenGL contexts 2022-06-26 18:32:10 +02:00
Le Philousophe bbcdda6c7f ANDROID: Merge touch mode and toggle keyboard buttons
A long press on the button shows the keyboard
2022-06-14 00:08:04 +03:00