Commit graph

884 commits

Author SHA1 Message Date
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
Charles Lombardo
daee8fe1d4 android: Don't set a default emulation orientation
Could cause unnecessary configuration change when setting an orientation other than "Landscape"
2023-08-27 00:19:03 -04:00
Charles Lombardo
b3fac55a35 android: Properly adjust emulation surface aspect ratio
Previously the emulation surface wouldn't respond properly to orientation changes. This would result in the screen appearing stretched when starting in one orientation and switching to another.

The code for calculating the bounds of the view have been changed to match the expected behavior now. Before the view would just match parent in height and width. Now instead of using setLeftTopRightBottom (which is intended to be used for animations) we pass newly calculated bounds for the view into super. Now the view bounds match the emulation output.

This also means that we don't need the overload for the SettingsActivity to launch it using an ActivityResultLauncher. We can just update the view in onResume.
2023-08-27 00:16:53 -04:00
liamwhite
e392005f94 Merge pull request #11356 from lat9nq/console-mode-pg
general,config-qt: Present Console Mode as an enum with separate options in game properties
2023-08-26 19:15:00 -04:00
Charles Lombardo
64e569ee75 android: Use appCategory to specify the app is a game 2023-08-25 17:17:48 -04:00
bunnei
22e7d8d36d Merge pull request #11357 from liamwhite/lime-vfs
android: jni: ensure NCAs from loaded filepath are registered in manual content provider
2023-08-25 13:04:22 -07:00
liamwhite
df1a6d30a0 Merge pull request #11352 from t895/recurse-subfolders
android: Search game directory recursively
2023-08-23 10:20:02 -04:00
Charles Lombardo
7305df2e3f android: Set default build variant to mainlineRelWithDebInfo (#11358) 2023-08-23 16:12:39 +02:00
Liam
45957b2ab1 android: jni: ensure NCAs from loaded filepath are registered in manual content provider 2023-08-22 22:47:25 -04:00
lat9nq
1bf14338b7 native: Use Docked Mode helper 2023-08-22 22:40:36 -04:00
lat9nq
7bc06e2c9d config-android: Translate console mode setting
Translates the previous boolean to the enum.
2023-08-22 22:00:28 -04:00
Charles Lombardo
72da1cd4d2 android: Search game directory recursively 2023-08-22 15:16:20 -04:00
liamwhite
453fd52d82 Merge pull request #11346 from t895/ktlint-fix
android: lint: Delete generated ktlint folder between builds
2023-08-22 11:30:01 -04:00
Charles Lombardo
4165adc80f android: lint: Delete generated ktlint folder between builds
There's a bug in ktlint where it will run into an error if you build the project, delete a source file, and then build again. It will be unable to find the file you deleted and can't recover until these files are deleted. This just deletes those files before every run.
2023-08-21 17:31:13 -04:00
Charles Lombardo
b3646c33ae android: Show associated value in home settings (#11272) 2023-08-21 22:25:11 +02:00
Charles Lombardo
4decc08f2b android: Use sensor landscape for landscape mode (#11337) 2023-08-21 21:56:12 +02:00
bunnei
5be144671f Merge pull request #11273 from t895/setup-completion
android: Setup additions
2023-08-14 15:41:35 -07:00
Charles Lombardo
279d14f8b1 android: Page forward on setup step completion 2023-08-12 20:21:47 -04:00
Charles Lombardo
ced5b29eeb android: Adjust setup fragment layout
Fixes padding issues in small and large layouts and allows viewpager to reach into system insets.
2023-08-12 17:02:59 -04:00
Charles Lombardo
447cf0a336 android: Show complete indicator during setup 2023-08-12 16:53:14 -04:00
Charles Lombardo
465c5c02a0 android: Remove redundant option from slider dialog
You can already reset any setting by long pressing the settings item.
2023-08-12 15:45:27 -04:00
Charles Lombardo
cea5d7d400 android: Reduce opacity of non-editable settings 2023-08-12 15:42:55 -04:00
Charles Lombardo
7384816f8b android: Use string resource for slider value/units 2023-08-12 15:42:54 -04:00
Charles Lombardo
52942ac262 android: Display setting value in setting list items 2023-08-12 14:38:46 -04:00
Charles Lombardo
e75c4156ce android: Set switch listener before assigning new value
Previously the switch could have its old listener triggered when recycled.
2023-08-12 01:00:42 -04:00
liamwhite
28b236b988 Merge pull request #10839 from lat9nq/pgc-plus
general: Reimplement per-game configurations
2023-08-02 14:25:52 -04:00
Abandoned Cart
9a1c345f7e android: Only label language with language 2023-07-25 10:38:30 -04:00
Liam
f07dd39222 general: reduce use of dynamic_cast 2023-07-21 19:22:14 -04:00
lat9nq
b7a56c1ff5 config-android: Update memory layout member name 2023-07-21 10:56:55 -04:00
lat9nq
fa626cd665 android-config: Update enum labels 2023-07-21 10:56:55 -04:00
lat9nq
ce08bcb4a1 (android)config: Clang format 2023-07-21 10:56:55 -04:00
lat9nq
0f8a902d8c android-config: Adapt settings rework 2023-07-21 10:56:07 -04:00
Valeri Ochinski
cd7fc3a3fe android: fix links to re-dumping guides 2023-07-16 20:22:27 +03:00
Charles Lombardo
b9b5f6a885 android: Visualize disabled home options
Allow for displaying options in the home options that are disabled with messages that explain why they are disabled.

This includes reasoning for the GPU driver installation button.
2023-07-10 22:17:19 -04:00
Charles Lombardo
190a9d386b android: Don't prompt to save user data on uninstall
While this can be convenient in some scenarios, this will be a big problem for users trying to sideload different APK versions. If they forget the last one they had installed, they could have problems installing a new copy.
2023-07-09 19:02:42 -04:00
liamwhite
9c44ee364c Merge pull request #11006 from german77/nfc_nfc
service: nfc: Ensure controller is in the correct mode
2023-07-05 09:23:47 -04:00
german77
91445cd2e8 android: Reintroduce launch mode as single top 2023-07-03 09:31:02 -06:00
Charles Lombardo
e4fc1f5d7b android: Version the input overlay
Now within the Input Overlay file, there is a version that will determine when the overlay will be reset. This is intended for breaking changes like the ones we had with the additions of percentage based layouts or the addition of foldable/portrait layouts. This also includes versions for each individual layout so we don't have to reset every layout if only one is broken.

Additionally, this includes new L3/R3 buttons.
2023-07-02 20:19:01 -04:00
liamwhite
0a416da90b Merge pull request #10949 from t895/memory-requirements
android: Rework MemoryUtil
2023-07-02 11:29:08 -04:00