Le Philousophe
7f0d75bbfc
ANDROID: Fix cursor position in touchpad mode while rotating
...
Without this, the cursor ends up in limbo and you need to scroll several
times to make it appear again.
2023-07-04 21:09:13 +02:00
Le Philousophe
7d816c23db
ANDROID: Reload keyboard on display configuration change
...
This ensures that keyboard is properly resized
2023-07-01 16:26:19 +02:00
Le Philousophe
d371b50d30
ANDROID: Add setting to to disable screen rotation
2023-07-01 16:26:19 +02:00
Le Philousophe
3a838c99f9
ANDROID: Various small fixes
...
- Comment and space fixes
- Remove outdated setting
2023-07-01 16:26:19 +02:00
Le Philousophe
1cffb9c86a
ANDROID: Don't make GL calls when there is not context
...
This is forbidden by EGL specification
2023-06-26 15:25:27 +03:00
Le Philousophe
8e731782cc
ANDROID: Fix ifdef
...
isRunningInMainThread is used by GLTHREADCHECK when ANDROID_DEBUG_GL is
defined
2023-06-26 15:25:27 +03:00
Cameron Cawley
33b09af3b2
ANDROID: Allow screen rotation
2023-06-26 15:25:27 +03:00
Le Philousophe
bc438d078a
ANDROID: When resizing don't reset everything
...
Only reinitialize the needed bits.
EGLSurface needs to be reset to take the new size into account.
GLSurfaceView in AOSP does the same thing.
2023-06-26 15:25:27 +03:00
Le Philousophe
14d57b2b61
ANDROID: Don't use a framebuffer when it's not needed
...
This also fixes a bug in frame buffer placement in vertical aspect ratio
2023-06-26 15:25:27 +03:00
Le Philousophe
75b3be75b3
ANDROID: Don't improve score when bits is not enough
2023-06-26 15:25:27 +03:00
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 Philousophe
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