Commit Graph

598 Commits

Author SHA1 Message Date
Flyinghead a46dc71156 android: target android 14 / sdk 34 2024-09-23 18:01:21 +02:00
Flyinghead 63ef3aaab4 android: avoid crash when app is run in restricted mode
App may be run in restricted mode, where the Application object is a
generic android.app.Application. Disallow backup to avoid this. If
Application object isn't of the expected type, restart the app.
2024-09-23 17:21:02 +02:00
Flyinghead abe71409b5 android: race condition with render thread. ANR with auto save state
Race condition when starting then stopping the render thread:
mainui_enabled isn't set until after the thread has started. If stopped
during that time, it will hang.
Auto save state in a background thread to avoid ANR.
2024-09-23 17:17:46 +02:00
Flyinghead f8c12d2835 android: fix getFileInfo for document uri. cheats: limit file size
android: Fix AndroidStorage.getFileInfo for document uri (cheat file)
cheats: limit cheat file size to 1MB to avoid parsing garbage forever. Save file path only if valid.
2024-09-23 17:08:57 +02:00
Flyinghead 0e97f97bb7 android: virtual gamepad rumble power wasn't set at app startup
Make sure emu.cfg is loaded before setting rumble power.
Issue #1640
2024-09-16 11:28:25 +02:00
Flyinghead 8ea12443d3 android: fix touchscreen coords when view is scaled
Samsung phones/tablets can scale down the emulator view to improve
performance. In this case, getPointerCoords() returns screen, not view
coordinates. Use MotionEvent.getX/Y() instead.
2024-08-16 13:12:27 +02:00
Flyinghead 6679cb2f31 android: show/hide keyboard in main thread to avoid deadlock
Tentative fix for deadlock when main thread is calling
JNIdc.rendinitNative(null), and render thread is blocked on a lock
trying to hide on-screen keyboard.
2024-08-16 10:17:06 +02:00
Flyinghead f1fd8b12e2 android: do all rumble/haptic on background thread
Haptic effects for the virtual gamepad must be done on a background
thread. Not sure about gamepad rumble but it shouldn't hurt.
Reuse haptic duration for haptic power (0-100).
Fix crash when power is zero (createOneShot needs power >= 1)
2024-08-15 17:25:02 +02:00
Flyinghead aafa9f0bf0 android: intent url ignored unless external storage legacy is enabled
Issue #1584

Accept fileDir (internal storage) as home folder in case it was created
without external storage.
2024-08-15 12:09:27 +02:00
Flyinghead dae3676979 android: NPE in NativeGLView when Emulator.currentActivity is null 2024-08-15 11:58:45 +02:00
Flyinghead 8b2c1bc5dc android: bug fixes
onInputDeviceAdded may be called with an invalid device id. Avoid NPE
onGenericMotionEvent: event may have a null device. Avoid NPE
getExternalFilesDir may return null if no external storage available.
Use getFilesDir in this case.
Catch exceptions in HomeMover and continue.
addStorage: catch SecurityException and alert user. Graceful failure.
2024-07-20 10:30:27 +02:00
Flyinghead 2b83df86cd boxart: don't save database when pausing (android, uwp)
Avoids ANR on android. Unnecessary since database is now saved
regularly.
2024-07-20 10:07:18 +02:00
Flyinghead a01edd22c7 Merge remote-tracking branch 'origin/dev' into playstore 2024-06-30 11:24:46 +02:00
Flyinghead fefdb6c661 Merge remote-tracking branch 'origin/master' into dev 2024-06-23 16:15:13 +02:00
Flyinghead 4dd490034a android: disable home folder migration 2024-06-23 16:13:28 +02:00
Flyinghead f50d6204dd android: tentative fix for touchscreen not working on android 14
Use more generic source test to detect touch events. Also get rid of
Retroid Pocket 2+ specific test.
Issue #1421
2024-06-23 11:05:40 +02:00
Flyinghead 07172416c1 android: tentative fix for touchscreen not working on android 14
Use more generic source test to detect touch events. Also get rid of
Retroid Pocket 2+ specific test.
Issue #1421
2024-06-22 15:07:05 +02:00
Flyinghead 83a27b9125 android: import/export home folder
Use "folder" instead of "directory" in UI.
When game list is empty, show button to easily add a new content path.
Improve folder paths display in settings with middle ellipsis.
android: import/export home folder content
2024-06-21 18:37:34 +02:00
Flyinghead 9976fe10fb android: gamepad rumble support (untested)
Use single thread to handle rumble for virtual and physical gamepads.
Use heavy click effect for vgamepad buttons when available (android 10)
Handle rumble inclination param.
2024-06-21 18:32:25 +02:00
Flyinghead af7edadedb Merge remote-tracking branch 'origin/dev' into playstore 2024-06-21 18:20:40 +02:00
Flyinghead d882c48b4f android screenshots 2024-06-20 18:18:01 +02:00
Flyinghead 0a9eaa6cb8 android: storage fixes
storage: add file update date to FileInfo.
Savestates and custom textures can be loaded from content path / ASS.
Cache last savestate update date to improve perf on android.
android: Don't use scoped storage for android < 5. Optimize listContent.
Fix getSubPath
android: instrumented storage test
2024-06-17 09:53:32 +02:00
Flyinghead 977d6c6f95 android: upload to google play 2024-06-14 12:59:19 +02:00
Flyinghead 2103dd5a7a storage: add exists() method. load bios from content path. android fix
Add Storage::exists() method
Allow dc and arcade bios to be loaded from content path.
Fix android getSubPath when called on a root uri.
2024-06-14 12:39:32 +02:00
Flyinghead 9df12f950b android: target android 13
disable non-android CI jobs
2024-06-13 20:25:12 +02:00
Flyinghead aed4d21a4f android: prepare transition to sdk 30+. cache last savestate path
Migrate home folder to externalFilesDir
(/sdcard/Android/data/com.flycast.emulator/files) if running on android
10+.
Use externalFilesDir for home by default. No more onboarding on first
install.
Use content uri instead of hacking out real path since the latter won't
work on higher target sdk.
Cache last readable savestate path in hostfs::getSavestatePath(). All
content folders are scanned when not found, which is very slow with ASS
2024-06-13 15:36:29 +02:00
Flyinghead bad55204f2 android: rename packages and activities 2024-06-01 19:03:58 +02:00
scribam a5608f4f22 android: update project
- Upgrade AGP dependency from 8.3.0 to 8.4.1
- Upgrade Gradle version to 8.6
- Use version catalogs
2024-05-22 16:16:07 +02:00
Flyinghead 6f0581032b save screenshot. add screenshot to savestates
Retrieve last frame rgb data (gl, vk, dx9, dx11).
Specific save screenshot code for android, iOS and UWP.
Add Save Screenshot emu key (F12 by default)
vk: defer deletion of in-flight textures when texture cache is cleared.
vk: fix issue when updating imgui textures after a render pass has begun
(achievements)
vk: palette texture not updated after a state has been loaded.
gl: Move opengl-specific stuff into opengl imgui driver.
savestate: Add non compressed header, following by screenshot png data,
before actual savestate.

Issue #842
2024-05-13 15:47:34 +02:00
Flyinghead 13302b87c8 move ui to its own folder 2024-05-07 22:23:51 +02:00
Flyinghead 300cf0d437 better RetroAchievements UI and threading
Pop ups for authentication, game load, game completed, achievements
unlock and progress.
Handle disk changes.
Issue #761
2024-05-01 18:32:39 +02:00
Flyinghead c96e828c63 move http_client to oslib 2024-04-29 16:17:50 +02:00
Flyinghead 8fdd1dde3d RetroAchievements support
MVP
Issue #761
2024-04-29 14:59:47 +02:00
Flyinghead 336706e728 move most os_* funcs to oslib
add os_DestroyWindow and os_UpdateInputState
2024-04-12 17:37:45 +02:00
Flyinghead 06a6e26588 get rid of os_GetSeconds()
replace it with std::chrono-based getTimeMs()
2024-04-11 15:25:25 +02:00
Flyinghead 42e98e86d0 set thread names
Name all threads to help debugging and improve crash reports (windows
only)
Add ^C handler for clean exit on linux
2024-04-10 17:08:24 +02:00
Flyinghead a6c4530e22 vulkan: allow custom GPU driver loading with libadrenotools
Issue #1471
2024-04-07 12:27:54 +02:00
scribam d2dc60ec00 android: update android gradle plugin to version 8.3.0 2024-03-02 18:36:54 +01:00
Flyinghead c9d3096e41 android: hid barcode scanner support 2024-02-27 17:39:51 +01:00
scribam 51d25bb49b android: update android gradle plugin to version 8.2.2 2024-02-03 16:28:57 +01:00
scribam f6b01aba0c android: update android gradle plugin to version 8.2.1 2024-01-20 19:24:07 +01:00
Flyinghead c001240797 move audio drivers to their own folder 2024-01-10 11:45:54 +01:00
Flyinghead 9c964ac955 refactor embedded resource loading. Use for imgui font and android OSD
Generic embedded resource loading function
Zip bios and printer fonts
Add buttons.png and Roboto-Medium.ttf as embedded resources
2024-01-02 14:37:29 +01:00
scribam bf4346c849 android: update agp and gradle to version 8.2 2023-12-13 17:31:56 +01:00
scribam f14c29fd04 android: update android gradle plugin to version 8.1.4 2023-11-18 18:21:45 +01:00
Flyinghead 7b71bd319c Android and iOS support. Change dead zone to integer % value in UI
UI: dead zone changes from 0 to 100%. Add % for Rumble too.
Support Android and iOS gamepads.
Assume legacy gamepads have an analog stick (evdev, xinput)
2023-10-30 18:28:29 +01:00
Flyinghead 8ba5e05421 android scoped storage: default to hack the uri manually in getParentUri
If DocumentsContract.Path.getPath() fails, try to hack the uri manually
instead of returning null/empty (android 10)
2023-10-21 21:40:13 +02:00
scribam 7fc70ee1f4 android: update android gradle plugin to version 8.1.2 2023-10-03 22:50:35 +02:00
Flyinghead a915f185f8 Merge remote-tracking branch 'origin/master' into dev 2023-09-25 22:17:29 +02:00
vkedwardli b564b0bf91
Increase L2+ / R2+ trigger sensitivity for digital buttons (#1190) 2023-09-14 09:08:58 +02:00