Commit Graph

2118 Commits

Author SHA1 Message Date
Charles Lombardo
065c80fb4d Android: Convert SliderSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
3c6bb9e0c9 Android: Convert SingleChoiceSettingDynamicDescriptions to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
d51f504629 Android: Convert SingleChoiceSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
1fc9f03b27 Android: Convert RunRunnable to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
62679bacc1 Android: Convert PercentSliderSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
72be338d56 Android: Convert LogSwitchSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
56c33890b9 Android: Convert InvertedSwitchSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
2369977e14 Android: Convert IntSliderSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
826e849a7b Android: Convert InputStringSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
fc97c4d35a Android: Convert HyperLinkHeaderSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
f95fd7788e Android: Convert HeaderSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
1e2e9e004b Android: Convert FloatSliderSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
f7ad065408 Android: Convert FilePicker to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
1553477c09 Android: Convert StringSetting to Kotlin 2023-03-15 17:35:34 -04:00
Charles Lombardo
2c560e05a8 Android: Convert Settings to Kotlin 2023-03-15 17:35:21 -04:00
Charles Lombardo
dee85cead8 Android: Convert PostProcessing to Kotlin 2023-03-15 17:35:21 -04:00
Charles Lombardo
42f4fb815f Android: Convert NativeConfig to Kotlin 2023-03-15 17:35:21 -04:00
Charles Lombardo
7c59640f8e Android: Convert IntSetting to Kotlin 2023-03-15 17:35:21 -04:00
Charles Lombardo
46e68171b9 Android: Convert FloatSetting to Kotlin 2023-03-15 17:34:49 -04:00
Charles Lombardo
3ac72855e3 Android: Convert BooleanSetting to Kotlin 2023-03-15 17:34:21 -04:00
Charles Lombardo
84c23c14db Android: Convert AdHocStringSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
a8f3d4291a Android: Convert AdHocBooleanSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
f1028b4652 Android: Convert AbstractStringSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
32f9e48257 Android: Convert AbstractIntSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
baeeaa2a43 Android: Convert AbstractFloatSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
5bc2b46983 Android: Convert AbstractBooleanSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
21e0b5b9d9 Android: Convert AbstractSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
43fa5cf5e4 Android: Convert SettingsItem to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
6dc6720250 Android: Convert StringSingleChoiceSetting to Kotlin 2023-03-15 15:49:37 -04:00
Charles Lombardo
98ab893be7 Android: Create extension functions for serializables
Getting serializables without explicitly stating the type is deprecated in Android 13. However we still need a way to get a serializable in versions below that. Now with these we can avoid repeating the same if block.
2023-03-15 14:26:37 -04:00
JosJuice
fe8be906f3 Android: Use LifecycleOwner instead of subtype 2023-03-14 23:03:13 +01:00
JosJuice
846f5f6671 Android: Clean up outdated comment in AfterDirectoryInitializationRunner 2023-03-14 23:03:13 +01:00
Mai
4281606838
Merge pull request #11641 from JosJuice/android-remove-old-config
Android: Remove support for the old config system
2023-03-14 15:48:04 -04:00
Pierre Bourdon
aceafc9d26
Merge pull request #11652 from t895/header-padding
Android: Make header padding appear even
2023-03-14 13:03:19 +01:00
Pierre Bourdon
970ddf0ea0
Merge pull request #11651 from JosJuice/android-profile-off-by-one
Android: Fix per-game profile setting off-by-one
2023-03-14 02:02:00 +01:00
Charles Lombardo
4f610bb354 Android: Make header padding appear even 2023-03-13 15:27:09 -04:00
JosJuice
5818685911 Android: Fix per-game profile setting off-by-one 2023-03-13 18:30:55 +01:00
Robin Kertels
784ce78eaf
Android: Use $applicationId for DocmentProvider authority
Fixes side by side installation of debug, benchmark and release builds.
2023-03-12 15:28:21 +01:00
JosJuice
804b94ee9e
Merge pull request #11524 from K0bin/document-provider
Android: Implement DocumentProvider
2023-03-11 19:24:19 +01:00
JosJuice
08334015f9 Android: Remove SettingsActivityView parameters from Settings
No longer used for anything.
2023-03-11 18:49:43 +01:00
JosJuice
99600ef781 Android: Rework the "global" settings functions
getXGlobal() is now identical to getX(), and setXGlobal(int, X) is now
identical to setX(int, X) in the cases where setX(int, X) exists.
We can remove/rename them.
2023-03-11 18:49:43 +01:00
JosJuice
58fc347f8d Android: Don't require Settings object for reading a setting
Made unnecessary by the previous commit.
2023-03-11 18:49:43 +01:00
JosJuice
68fd133057 Android: Remove support for the old config system
All settings that we care about from an Android perspective are now
supported by the new config system, so we can remove all the Android code
for the old config system. This should have no impact on users.
2023-03-11 17:51:59 +01:00
JosJuice
53e7090f55 Migrate game INI profile setting to new config system 2023-03-11 17:51:58 +01:00
JosJuice
62ff2f1030
Merge pull request #11385 from JosJuice/android-input-overhaul
Android input overhaul
2023-03-11 12:37:44 +01:00
Admiral H. Curtiss
eb25c46a91
HW/DVDInterface: Refactor to class. 2023-03-10 18:12:59 +01:00
Robin Kertels
13ed46a488
Android: Implement DocumentProvider
This allows users to access the Dolphin user directory.
2023-03-08 23:09:49 +01:00
Robin Kertels
1b47144312
Android: Center list view headers 2023-03-08 18:57:19 +01:00
Robin Kertels
edde253724
Android: Only show divider in settings for headers 2023-03-08 18:57:08 +01:00
Charles Lombardo
75ce7a04ca Android: Use coroutine for system updates 2023-03-07 15:45:41 -05:00
Charles Lombardo
d66d8210bf Android: Switch to indeterminate progress bar on system update cancel 2023-03-07 15:45:41 -05:00
Charles Lombardo
917ca2273e Android: Remove hardcoded strings from system update dialogs 2023-03-07 15:45:41 -05:00
Charles Lombardo
410aaef56e Android: Remove orientation lock on system update dialog 2023-03-07 15:45:41 -05:00
Charles Lombardo
c0868f04a9 Android: Use Kotlin extensions for lifecycle components 2023-03-07 15:45:41 -05:00
Charles Lombardo
5eeb0a540b Android: Convert OnlineUpdateRegionSelectDialogFragment to Kotlin 2023-03-07 15:45:41 -05:00
Charles Lombardo
0ac4fe763b Android: Convert SystemMenuNotInstalledDialogFragment to Kotlin 2023-03-07 15:45:41 -05:00
Charles Lombardo
c8907349be Android: Convert SystemUpdateResultFragment to Kotlin 2023-03-07 15:45:40 -05:00
Charles Lombardo
60cb886cd4 Android: Convert WiiUtils to Kotlin 2023-03-07 15:45:40 -05:00
Charles Lombardo
2b17e0334a Android: Convert SystemUpdateViewModel to Kotlin 2023-03-07 15:45:40 -05:00
Charles Lombardo
6dfa555099 Android: Convert SystemUpdateProgressBarDialogFragment to Kotlin 2023-03-07 15:45:40 -05:00
JosJuice
75fb1a7edf Android: Disable input device sensor input due to crash 2023-03-07 17:39:34 +01:00
JosJuice
1788a797e7 Android: Add "more settings" button to overlay control setting dialog
Some people might wonder where the ability to select an extension
and the Sideways Wii Remote went. This button will take them to the
general settings, which is where those settings now live.

At some point in the future, we should probably move everything to the
general settings. But this pull request is already big enough as it is!
2023-03-07 17:39:34 +01:00
JosJuice
6b5f82c12f Android: Change how the overlay controller setting works, part 2
The previous commit wasn't enough for getting inputs to work for
controllers 2-4.
2023-03-07 17:39:34 +01:00
JosJuice
1b55d7c594 Android: Change how the overlay controller setting works
Up until now, there have been two settings on Android that stored the
selected Wii Remote extension: the normal one that's also used on PC,
and a SharedPreferences one that's used by the overlay controls to
determine what controls to show. It is possible for these two to end up
out of sync, and my input changes have made that more likely to happen.

To fix this, let's rework how the overlay controller setting works.
We don't want it to encode the currently selected Wii Remote extension.
However, we can't simply get rid of the setting, because for some Wii
games we need the ability to switch between a GameCube controller and a
Wii Remote. What this commit does is give the user the option to select
any of the 4 GameCube controllers and any of the 4 Wii Remotes. (Before,
controllers 2-4 weren't available in the overlay.) Could be useful for
things like the Psycho Mantis fight in Metal Gear Solid. I'm also
switching from SharedPreferences to Dolphin.ini while I'm at it.
2023-03-07 17:39:34 +01:00
JosJuice
4c326f2030 Android: Remove the in-emulation IR sensitivity options
This too can be set in the normal controller settings now.
2023-03-07 17:39:34 +01:00
JosJuice
ee2c7dc24b Android: Remove the in-emulation motion control options
You can set this in the normal controller settings now.
2023-03-07 17:39:34 +01:00
JosJuice
32cb41007b Android: Allow changing controller settings during emulation 2023-03-07 17:39:34 +01:00
JosJuice
c2779aef06 Android: Add the advanced input mapping dialog
It's missing a lot of features from the PC version for now, like
buttons for inserting functions and the ability to see what the
expression evaluates to. I mostly just wanted to get something in
place so you can set up rumble.

Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
2023-03-07 17:39:30 +01:00
JosJuice
42943672bb Android: Add selecting input profile per game 2023-03-03 22:28:25 +01:00
JosJuice
1eeded23df Android: Add input profile management
Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
2023-03-03 22:28:25 +01:00
JosJuice
7ef229d908 Android: Show warning when using old pre-defined controller INIs
Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
2023-03-03 22:28:25 +01:00
JosJuice
8b78f73e80 Android: Add Default and Clear actions for controllers 2023-03-03 22:28:25 +01:00
JosJuice
ea3200d4ba Android: Prevent showing mapping dialog with no device selected 2023-03-03 22:28:25 +01:00
JosJuice
a1cc19f443 Android: Add "Create mappings for other devices" 2023-03-03 22:28:24 +01:00
JosJuice
2b1dd52750 Android: Add input device selection 2023-03-03 22:28:24 +01:00
JosJuice
2113bf5e3a Android: Implement enabling/disabling control groups
All this code for just a single checkbox... Ah well, it has to be done
2023-03-03 22:28:24 +01:00
JosJuice
a78dca5fb0 Android: Move Sideways Wii Remote setting one submenu up
A slight departure from DolphinQt, but I think it makes sense, because
it will make the important Sideways Wii Remote setting easier to find.
2023-03-03 22:28:24 +01:00
JosJuice
e7530a1cb9 Android: Split Wii Remote settings into submenus
Too much stuff on one screen otherwise. This split matches DolphinQt.
2023-03-03 22:28:24 +01:00
JosJuice
0dd8bbbbbb Android: Add extension selection 2023-03-03 22:28:24 +01:00
JosJuice
1c26a85e35 Android: Add NumericSetting support 2023-03-03 22:28:24 +01:00
JosJuice
2c529b9db1 Android: Add new input mapping implementation 2023-03-03 22:28:24 +01:00
JosJuice
dd8976f18d Android: Remove old input mapping implementation
This old code is of no use now that ButtonManager is gone.
2023-03-03 22:28:24 +01:00
JosJuice
304d898966 Android: Remove copyAsset's overwrite parameter
Because of the previous commit, this is no longer needed.
2023-03-03 22:28:24 +01:00
JosJuice
93657cce54 Android: Stop extracting pre-defined controller INIs 2023-03-03 22:28:24 +01:00
JosJuice
8e33458f48 ControllerInterface/Android: Implement rumble 2023-03-03 22:28:23 +01:00
JosJuice
065481d989 ControllerInterface/Android: Automatically suspend sensors
This is a battery-saving measure. Whether a sensor should be suspended
is determined in the same way as whether key events and motion events
should be handled by the OS rather than consumed by Dolphin.
2023-03-03 22:28:23 +01:00
JosJuice
36acb17700 ControllerInterface/Android: Implement sensor input for InputDevices
This functionality was added in Android 12 to let apps get motion data
for gamepads.
2023-03-03 22:28:23 +01:00
JosJuice
5e51b56d72 ControllerInterface/Android: Implement sensor input 2023-03-03 22:28:23 +01:00
JosJuice
104ea09892 ControllerInterface/Android: Implement hotplug 2023-03-03 22:28:23 +01:00
JosJuice
ca508e4503 ControllerInterface/Android: Handle input events
Android doesn't let us poll inputs whenever we want. Instead, we
listen to input events (activities will have to forward them to the
input backend), and store the received values in atomic variables
in the Input classes. This is similar in concept to how ButtonManager
worked, but without its homegrown second input mapping system.
2023-03-03 22:28:23 +01:00
JosJuice
68ebb5c33e Android: Remove old rumble implementation 2023-03-03 22:28:23 +01:00
JosJuice
9e7a2ee0fb Android: Remove old motion input implementation 2023-03-03 22:28:23 +01:00
JosJuice
0150f521f7 ControllerInterface/Android: Rip out ButtonManager
ButtonManager is very different from how a normal input backend works,
and is making it hard for us to improve controller support on Android.
The following commits will add a new input backend in its place.
2023-03-03 22:28:23 +01:00
JosJuice
95ce41ac56
Merge pull request #11399 from JosJuice/jit-one-stack
Jit: Don't use a second stack
2023-03-03 22:27:16 +01:00
Mai
ab2f8d3475
Merge pull request #11607 from AdmiralCurtiss/sd-progress
Qt/WiiPane: Add progress window for SD card conversion.
2023-03-02 15:08:18 -05:00
Mai
6fcec80eb0
Merge pull request #11605 from JosJuice/android-mappings-button
Android: Add a button for accessing controller mappings
2023-03-02 15:06:47 -05:00
Mai
78e8669bac
Merge pull request #11614 from t895/kotlin-cheats
Android: Convert Cheats Activity to Kotlin
2023-03-02 15:04:19 -05:00
Mai
1b7969bc62
Merge pull request #11615 from t895/kotlin-riivolution
Android: Convert Riivolution Boot Activity to Kotlin
2023-03-02 15:03:43 -05:00
Mai
b9fd7e7bd4
Merge pull request #11616 from t895/kotlin-skylanders
Android: Convert Skylanders code to Kotlin
2023-03-02 15:03:18 -05:00
JosJuice
96deb2d897 Android: Hide controller mappings button when controller type is None
Also removed the make_sure_continuous_scan_enabled message.
It doesn't make sense with the new UX.
2023-03-02 18:25:10 +01:00