Commit graph

672 commits

Author SHA1 Message Date
Charles Lombardo
df8de8b260 android: Prevent nav bar shade from laying out across screen 2023-09-25 18:10:58 -04:00
Charles Lombardo
6147477bbd android: Use measured size of view for input overlay bounds
Even after updating the androidx window library, this did not fix the issue for all devices. This ensures that the measured size of the overlay will be used instead of a potentially larger one seen by androidx.
2023-09-24 22:18:38 -04:00
Charles Lombardo
4e485766bd android: Use smaller read buffer size for exporting user data
The File.readBytes() extension attempts to load an entire file into a byte array. This would cause crashes when loading huge files into memory.
2023-09-22 16:51:48 -04:00
Charles Lombardo
6315cb8010 android: Adjust valid user data check 2023-09-22 12:05:44 -04:00
Charles Lombardo
156c12d97d Merge pull request #11564 from t895/overlay-inset-fix
android: Update androidx window library to 1.2.0-beta03
2023-09-21 19:15:36 -04:00
Charles Lombardo
68068a8113 android: Update androidx window library to 1.2.0-beta03
Fixes an issue with the input overlay on certain devices where the controls would appear offscreen.
2023-09-21 17:36:14 -04:00
Charles Lombardo
e6c468f8a4 Revert "android: Allow save imports always" 2023-09-21 02:57:28 -04:00
Charles Lombardo
93ab5df3ee android: Remove unused strings related to the save manager 2023-09-20 15:01:03 -04:00
Charles Lombardo
e68fb0a884 android: Allow importing saves even if no saves are found
Exporting still won't be allowed on an empty save directory.
2023-09-20 15:00:34 -04:00
Charles Lombardo
a6a0aaa013 android: Add import/export buttons for user data 2023-09-19 15:54:47 -04:00
liamwhite
49b783c9a2 Merge pull request #11542 from t895/touch-offset-fix
android: Screen orientation and aspect ratio fixes
2023-09-19 09:25:09 -04:00
Charles Lombardo
eac616b224 android: Ignore validation layers library in git 2023-09-19 00:31:43 -04:00
Charles Lombardo
88b8509c53 android: Don't pause emulation when entering PiP 2023-09-19 00:31:43 -04:00
Charles Lombardo
ff4322ca01 android: Fix showing input overlay in PiP 2023-09-19 00:31:43 -04:00
Charles Lombardo
329403d279 android: Properly update emulation surface
Previously the emulation surface wasn't being updated during configuration changes and only during specific view events. This would break input and the screen dimensions after each orientation/aspect ratio change. Now a new surface is provided every time and the display dimensions are updated as needed.
2023-09-19 00:31:43 -04:00
Charles Lombardo
755928ffd1 android: Export PiP receiver on API 33 and later
Could cause crashes on API 33+ devices
2023-09-17 17:33:33 -04:00
Charles Lombardo
2940967210 android: Set up signing config for release builds 2023-09-17 01:22:16 -04:00
Charles Lombardo
6af676e2ce android: Collect task state once view is created
Before the viewLifecycleOwner wasn't ready and would cause a crash
2023-09-16 17:15:20 -04:00
liamwhite
f56103605e Merge pull request #11492 from lat9nq/c-numeric-conversions
general: Remove uncaught usages of C++ string number conversions
2023-09-16 11:40:03 -04:00
Charles Lombardo
f6b02d059e android: Remove settings interface specifically for audio mute 2023-09-14 23:46:19 -04:00
Charles Lombardo
1fd72951b8 Merge pull request #11507 from t895/emulation-stop-fix
android: Return the correct status code on emulation stop
2023-09-14 23:22:00 -04:00
Charles Lombardo
3ce204e7ba Merge pull request #11506 from t895/icon-fix
android: Use resource as shortcut intermediary
2023-09-14 23:21:45 -04:00
Charles Lombardo
52d7075ae0 android: Return the correct status code on emulation stop 2023-09-14 23:08:06 -04:00
Charles Lombardo
a1b80ed37a Merge pull request #11505 from t895/config-patch
android: Don't reinitialize settings on emulation start
2023-09-14 22:20:45 -04:00
Charles Lombardo
ebcde602e7 android: Use resource as shortcut intermediary
Fixes issue where the shortcut icon would appear cropped on certain devices
2023-09-14 22:19:08 -04:00
Charles Lombardo
b1e7638eab Merge pull request #11504 from t895/emu-args
android: Fix emulation to settings navigation args
2023-09-14 21:25:58 -04:00
Charles Lombardo
136e1f395d android: Don't reinitialize settings on emulation start
Config is already initialized on application start
2023-09-14 21:25:17 -04:00
Charles Lombardo
003ee32d6d android: Fix emulation to settings navigation args 2023-09-14 20:24:43 -04:00
Charles Lombardo
e6595bb31d android: Delay collecting UI state in games fragment 2023-09-14 20:02:48 -04:00
Charles Lombardo
89660a50bf android: Refactor menu tags to enum 2023-09-14 15:18:56 -04:00
Charles Lombardo
0c2cbd2469 android: Use StateFlow instead of LiveData 2023-09-14 15:18:56 -04:00
lat9nq
a681050e24 android/config: Remove uncaught usage of stoul 2023-09-13 13:36:25 -04:00
FearlessTobi
ff92a0c8f4 am: Implement UserChannel parameters
Used by the Super Mairo 3D All-Stars collection.
2023-09-10 15:39:25 -04:00
Charles Lombardo
3d1a408a99 android: Fix game content installer
Before this would run on the main thread and freeze the device. Additionally this fixes the result dialog not appearing if a config change happens during the installation by getting the activity's fragment manager when needed.
2023-08-30 19:05:33 -04:00
Charles Lombardo
b737fe66aa android: Combine LongMessageDialogFragment with MessageDialogFragment 2023-08-30 18:02:16 -04:00
Charles Lombardo
6cd58e9bd3 android: Support dynamic app shortcuts 2023-08-30 16:26:10 -04:00
Charles Lombardo
351caad5db android: Separate emulation states from emulation mutex
Emulation states are repeatedly checked by input and performance stats. During startup and shutdown, this could lead to a long halt on the UI thread because the call to IsRunning will be waiting on the emulation mutex to be unlocked. Using atomics should replace the existing functionality without causing problems.
2023-08-30 15:19:23 -04:00
Charles Lombardo
5b69f2967e android: Game loading/shutting down indicators 2023-08-30 15:19:23 -04:00
Charles Lombardo
2b09d48329 android: Create custom game icon loader 2023-08-30 10:19:05 -04:00
Charles Lombardo
483a39e4fb Merge pull request #11380 from t895/settings-integration
android: Settings rework
2023-08-29 22:20:59 -04:00
Charles Lombardo
1b4e4f9992 android: Don't reload settings when stopping settings activity 2023-08-29 21:44:18 -04:00
Charles Lombardo
27049027b4 android: Add optional androidDefault property to settings
Certain settings have specific defaults for Android only. This lets us reflect them in the Kotlin side with very little code.
2023-08-29 19:42:42 -04:00
Charles Lombardo
ea9f569361 android: Proper state restoration on settings dialogs
All dialog code (except for the Date/Time ones) has been extracted out into a generic settings dialog fragment that handles everything through a viewmodel. State for each dialog will now be retained and dialogs will stay shown through configuration changes.

I won't be changing the current state of the date and time dialog fragments until Google decides to make their classes non-final or if/when we migrate to Jetpack Compose.
2023-08-29 19:42:42 -04:00
Charles Lombardo
b5176a035c android: Add search for settings 2023-08-29 19:42:42 -04:00
Charles Lombardo
7673cdc6e5 android: Implement paired settings
Enables and disables editing on settings that rely on other boolean settings.
2023-08-29 19:42:41 -04:00
Charles Lombardo
38c7d26ffa android: Prevent infinite switch toggle loop
If something like a lifecycle event happens when this switch is toggled (Ex. whenever the black backgrounds switch is toggled), this could move the switch from the default position and trigger the checked changed listener and restart the loop. Here I just removed the listener at the start so we recycle the view properly still, set the checked state and then add the new listener.
2023-08-29 19:42:41 -04:00
Charles Lombardo
484189d435 android: Migrate settings to navigation component
Consolidates all of the settings components to the fragment and activity with no interfaces and only the settings fragment presenter. This also includes new material animations and new viewmodel usage to prevent the fragment and activity directly interacting with one another.
2023-08-29 19:42:41 -04:00
Charles Lombardo
ccacd84582 android: Trim settings enums and items
Take advantage of the new settings interface to reduce the amount of code we need for each setting item. Additionally make all settings items non-null to improve brevity.
2023-08-29 19:40:18 -04:00
Charles Lombardo
26d3fa2d01 android: Expose interface for getting settings from native code
Completely removes code related to parsing the settings file on the java side. Now all settings are accessed via NativeConfig.kt and config.cpp has been modified to be closer to the core counterpart. Since the core currently uses QSettings, we can't remove reliance from Wini yet. This also includes simplifications to each settings interface to get closer to native code and prepare for per-game settings.
2023-08-29 19:40:17 -04:00
Charles Lombardo
99ae57c433 android: Support intents to emulation activity 2023-08-29 02:57:20 -04:00