Commit graph

421 commits

Author SHA1 Message Date
Cameron Cawley
c1702a0953 ANDROID: Add an on-screen menu button 2021-06-19 14:37:35 +02:00
antoniou79
6afae47470 ANDROID: Add support for feature OSystem::kFeatureHiDPI
For testing purposes and feedback mostly

Also set the level for debug to 3, to get messages related to native resolution and scaling from the new hidpi gui scale code
2021-04-12 15:05:34 +03:00
Cameron Cawley
24b59ecb4c Revert "OPENGL: Implement high DPI support on Android (#1895)"
This reverts commit 177d709909.
2021-04-12 00:54:12 +01:00
antoniou
e69e149bd0 ANDROID: Support multiple right click with one finger down
If the user keeps one finger down they can still generate new right click events

Previously in multitouch events, we supported only one right click event starting from one finger down.
The user subsequently had to restart the multitouch mode for another right click; hence lift all fingers
from the surface and start again.
New behavior allows user to generate a new right click while holding one finger down and putting down and lifting a second finger.
I think this is more intuitive and user friendly, although it might require some getting used to, if one was accustomed to the old behavior
2021-03-28 20:59:39 +03:00
Cameron Cawley
cc328d9cfa ANDROID: Remove README.Android 2021-03-15 18:39:39 +02:00
Cameron Cawley
76b25ec1c3 GUI: Add a checkbox to allow overriding the global backend settings 2021-03-15 16:52:52 +02:00
antoniou
987becc529 ANDROID: Fix physical mouse behavior and allow multitouch hold and drag
Also added various comments to document behavior.

Minor JE_MULTI event (Fix concerned bad brackets code in the events.cpp for JE_MULTI (multiple fingers held down)
) fix and comments for mouse behavior
Allow onHover to catch the mouse events instead of OnTrackBallEvent()
Also the "system back" button is ignored for the Trackball too because we treat it as mouse in isMouse(e) check
Add multitouch handler class. Handling and early filtering of multitouch events is moved in the new class.
2021-01-10 22:10:29 +02:00
antoniou
23c066d00e ANDROID: Attempt to fix IllegalArgumentException for chooseEglConfig()
Crash reports mentioning this exception came from Play Store

stacktrace looked like the following:
java.lang.RuntimeException:
		  at org.scummvm.scummvm.ScummVM.run (ScummVM.java:144)
		  at java.lang.Thread.run (Thread.java:919)
		Caused by: java.lang.IllegalArgumentException:
		  at com.google.android.gles_jni.EGLImpl.eglGetConfigAttrib (Native Method)
		  at org.scummvm.scummvm.ScummVM$EglAttribs.<init> (ScummVM.java:339)
		  at org.scummvm.scummvm.ScummVM.chooseEglConfig (ScummVM.java:440)
		  at org.scummvm.scummvm.ScummVM.initEGL (ScummVM.java:180)
		  at org.scummvm.scummvm.ScummVM.run (ScummVM.java:133)
2020-12-01 19:42:01 +02:00
antoniou
60e7ea79d2 ANDROID: Menu key on virtual keyboard is system menu now
Before it was a Media Top Menu key and did nothing
2020-11-26 14:43:50 +02:00
antoniou
8863b5d92f ANDROID: Get current version info from the global gScummVMVersion
...instead of the versionName in build.gradle

Also check for "dirty" version name and in that case do not skip re-copying the asset files
2020-11-25 16:41:47 +02:00
antoniou
411407abf8 ANDROID: Restore check for Alt modifier in key events
And add checks for Meta, Caps, NumLock, Scroll lock modifiers too
2020-11-25 16:41:47 +02:00
Cameron Cawley
01b4432825 BACKENDS: Use Common::U32String for OSystem::setWindowCaption 2020-11-22 17:20:19 +00:00
Cameron Cawley
b246dbdfb6 ANDROID: Add a backend-specific options widget 2020-11-22 16:35:03 +00:00
Vladimir Serbinenko
68a9136e4d
COMMON: Rewrite Encoder and drop dependency on iconv (#2586)
Different platforms have different levels of support of encodings and
often have slight variations. We already have tables for most encoding
with only CJK missing. Full transcoding inclusion allows us to get reliable
encoding results independently of platform. The biggest con is the need for
external tables encoding.dat.

It removes a duplicate table for korean in graphics/korfont.cpp
2020-11-15 16:20:35 +01:00
antoniou
73c2c578ee ANDROID: Added a note comment about scummvm.ini location
Location is directly inside the app's internal storage folder

I am not sure if I did this by mistake, because I think it would be better for it
to be under the subpath ".config/scummvm" which we do create earlier.
However, this *mistake* makes the file easier accessible via the "LAN" feature,
since otherwise the user has to also enable the "show hidden files" option
and navigate specifically to the ".config/scummvm" subpath
to set it as root for the LAN server, in order to see the scummvm.ini.
In the current way, the user simply has to set the internal app folder
as root for the LAN server.
2020-11-13 10:46:41 +02:00
Eugene Sandulenko
5936026209 ALL: Clarify POTFILES, remove redundant common/translations.h includes 2020-11-10 03:03:49 +01:00
antoniou
0de952a59c ANDROID: Raise targetsdk to 29 but make use of requestLegacyExternalStorage
Also some fixes for deprecated warnings
2020-11-07 23:38:03 +02:00
Vladimir Serbinenko
e07fc52767
ANDROID: Merge few files between android and android3d (#2595)
While unfortunately it doesn't help with existing differences it help
to prevent their increase
2020-11-03 14:50:54 +01:00
antoniou
4bda9bf112 ANDROID: Use TextUtils.isEmpty() instead of String's isEmpty() 2020-11-01 19:38:07 +02:00
antoniou
7aa38e197a ANDROID: Callback for onDestroy at ScummVM thread end 2020-11-01 19:38:07 +02:00
antoniou
8fe6aae59e ANDROID: Use SAF for folder and file creation when normal way fails
Should affect only external "secondary" storage (eg. physical SD card)
2020-11-01 19:38:07 +02:00
antoniou
64eb1c0afe ANDROID: A tentative handling of handling joystick control
Basically as a virtual mouse
2020-10-25 02:30:32 +03:00
antoniou
cff369a14b ANDROID: Handle repeating keys for virtual keyboard 2020-10-24 16:04:11 +03:00
Matthew Duggan
e1bff1cbb3 ANDROID: Avoid crash if version no is not int
This can happen during development - shouldn't happen for any official release,
but even if it does let's just assume versions are different and default to
upgrading the config.
2020-10-20 20:41:38 +09:00
antoniou
79acea3a18 ANDROID: use gradle's auto-align and set debuggable to false for release build
There were issues with manually aligning apks possibly due to upgrading gradle

The manual zipalign even though running with no fail message, would NOT align the apk properly anymore.
Command to manual verify alignment of an apk is:
Android/Sdk/tools/bin/zipalign -c -v 4 release/ScummVM-release-unsigned.apk
2020-10-18 13:42:44 +03:00
antoniou
80e32dbbc8 ANDROID: Do not use or show virtual keyboard when physical is connected
The toggle button will still be shown, but it won't show the in-app keyboard when pressed, unless the physical keyboard is disconnected
2020-10-17 22:00:41 +03:00
antoniou
7551d119e2 ANDROID: Fix crash when connecting or disconnecting physical keyboard
And also add some code to load and use the keyCharacterMap of the source device for the event

It is unclear if getUnicodeChar() already does this (loads the keyCharacterMap of the source device.
If it does, then the extra code is redundant.
2020-10-17 21:40:08 +03:00
antoniou
87a76f4a56 ANDROID: Fix shifted keys and key combos 2020-10-17 19:20:58 +03:00
antoniou
3f3ad0b2ca ANDROID: Remove keyUp and keyDown overrides from EditSurfaceView
They were causing some nasty loops with certain keys and are largely redundant since we already had a events manager for keys
2020-10-16 21:39:54 +03:00
antoniou
48d6ff8d6b ANDROID: Set flag to leep screen on 2020-10-16 20:29:18 +03:00
antoniou
940b87000d ANDROID: Merge ontouch from EditSurfaceView into ScummVMEventsBase
Also fix a bug with back button not removing the keyboard if it is shown without clicking on a text input field
2020-10-16 20:08:52 +03:00
antoniou
4a9b6d12ac ANDROID: Use gradle 6.7 and plugin 4.1.0
Also remove ndk.dir from local.properties since it is getting deprecated

Gradle will only use the info (ndkVersion) in gradle.build. Possibly ndkPath too, but we probably don't need that, since ndk is within the sdk folder (default location)
2020-10-15 19:06:33 +03:00
antoniou
4d9ed8351b ANDROID: Use a in-app keyboard instead of system
Keyboard was ported over from our SDL port which used https://github.com/pelya/commandergenius/tree/sdl_android/project

Pending optimizations, floatable/draggable implementation and a few bug fixes
We are using a local copy and slightly modified version of KeyboardView and Keyboard (and related resources).
since the android KeyboardView widget will be deprecated in API 29.
The copies are taken from the AOSP, as per the recommendation from Android Developers.
2020-10-15 18:21:52 +03:00
Cameron Cawley
8c90d4e498 ANDROID: Add override keywords 2020-10-14 17:48:29 +01:00
Cameron Cawley
b6a8fc5dd2 ANDROID: Minor cleanup 2020-10-14 17:47:22 +01:00
antoniou
7bd9b1ac3d ANDROID: Reduce lint warnings and offer more drawable sizes
Also slightly tweak position and size of keyboard icon
2020-10-13 14:06:07 +03:00
antoniou
583c04ed15 ANDROID: Replace deprecated methods and fix some Code analyze warnings 2020-10-10 15:18:54 +03:00
Cameron Cawley
f59091c1e4 ANDROID: Use the input enums from the system headers 2020-10-09 07:57:08 +03:00
antoniou
e25ac0bc55 ANDROID: Correctly init config keys and reflect values on GUI
Also comments added about how this process works. Fixes bug #11743
2020-10-07 15:26:31 +03:00
antoniou
01c622b807 ANDROID: Add external app path if available to search path 2020-10-04 20:28:27 +03:00
antoniou
5613c50fb3 ANDROID: Set AC_BACK to be the default map for Skip action
If Skip is not otherwise mapped by the game engine explicitly
2020-10-03 12:26:38 +03:00
antoniou
319149343f ANDROID: Reduce more Lint warnings
Unused resources, mem leak for event handler, overried View's performClick for accessibility
2020-10-02 19:50:30 +03:00
antoniou
50eb038312 ANDROID: Comment about related bug report for transient config options 2020-10-02 12:42:06 +03:00
antoniou
bf54ea041b ANDROID: Fix for buggy backspace behavior in TYPE_NULL inputType
Code taken from https://stackoverflow.com/a/19980975
2020-10-01 00:06:20 +03:00
antoniou
303d4681f0 ANDROID: Send keys to app as they are typed
Fixes issue with bad system keyboard input to in-game fields
2020-10-01 00:06:20 +03:00
antoniou
138295f617 ANDROID: Minor optimization in clause evaluation for bugfix for 2.2.1beta1 2020-09-30 20:56:39 +03:00
antoniou
7e08306c66 ANDROID: Fix bug in 2.2.1 beta ignoring some config locations
This is a bug fix specific for 2.2.1 beta1

If an old config is found in the extra locations, it will be reused and replace the existing config. Also in that case, the extra locations will be scanned for saved games to copy to our default save location.
2020-09-30 20:03:03 +03:00
antoniou
4ea7455e09 ANDROID: Splash screen and additional locations to search for config and saves
The splash screen is an addition that was "forced" by the need to allow for permission granted to access external physical storage
2020-09-29 22:10:56 +03:00
antoniou
aa5a490bc7 ANDROID: Reduce Lint warnings 2020-09-28 17:55:04 +03:00
antoniou
f6d1ab66b7 ANDROID: Add comments and code to reinforce hiding of system cursor
For the case when an external mouse is connected to the device

The code still only fixes the issue for devices runnng Android 7.0 or newer
2020-09-26 22:03:20 +03:00