Commit graph

1770 commits

Author SHA1 Message Date
Charles Lombardo
903c94f7be Android: Update SDK and dependencies 2022-08-21 14:51:04 -04:00
Mai
fea552a4de
Merge pull request #10981 from JosJuice/android-string-single-choice-naming
Android: Clean up StringSingleChoiceSetting naming
2022-08-18 10:37:56 -04:00
JosJuice
46cb106124 Android: Clean up StringSingleChoiceSetting naming 2022-08-14 15:42:06 +02:00
JosJuice
1646197902 Android: Force quit app if external storage isn't mounted
In the past, directory initialization could fail for two reasons:
The user was rejecting the storage permission, or external storage
wasn't mounted. With the introduction of scoped storage, the first of
these two couldn't happen anymore; if the user rejects the storage
permission, we just use the app-specific directory instead of the
dolphin-emu directory.

By making it so Dolphin force quits if external storage isn't mounted,
we can get rid of our code for handling retrying directory initialization
after it fails. I think this slight hit to UX is worth it considering
that basically nobody has an Android device with detachable primary
external storage anymore. And the UX hit is very small; the user just has
to manually open the app again after remounting external storage. The
toast about external storage not being mounted will still be displayed.

The recent merge of the splash screen PR may have made it so that the
code for handling directory initialization failing doesn't work anymore.
To be completely honest, I'm not sure how to even test this in 2022.
2022-08-13 18:59:23 +02:00
Charles Lombardo
0c89e5ea8d Add AndroidTV splash screen 2022-08-10 15:53:45 -04:00
Charles Lombardo
1dff1c3fe8 Android: Add Androidx splash screen to wait for directory initialization 2022-08-10 15:37:10 -04:00
JosJuice
3f794bf87e
Merge pull request #10974 from t895/permissions-fix
Android: Prevent app lockup when revoking write access
2022-08-10 20:27:30 +02:00
Charles Lombardo
a91e47899d Android: Prevent app lockup when revoking write access 2022-08-10 13:57:30 -04:00
Pokechu22
1004e34167 Android: Don't set the signingConfig if keystore property isn't set
If the property isn't set, we don't initialize the release config, so we shouldn't use it. This fixes building issues for me.
2022-08-10 09:58:49 -07:00
Charles Lombardo
e926946f64 Consistent tv card colors
Item selected color is now dolphin-blue for all cards in the TV activity.
2022-08-10 00:23:19 -04:00
Scott Mansell
4c2d707538
Merge pull request #10940 from InvoxiPlayGames/ipc-discord
Add Discord presence ioctlv to /dev/dolphin
2022-08-08 08:11:42 +12:00
InvoxiPlayGames
f9e39cf200 Add Discord presence ioctlv to /dev/dolphin 2022-08-06 07:32:29 +01:00
JosJuice
3a6df63e9b DiscIO: Add support for the NFS format
For a few years now, I've been thinking it would be nice to make Dolphin
support reading Wii games in the format they come in when you download
them from the Wii U eShop. The Wii U eShop has some good deals on Wii
games (Metroid Prime Trilogy especially is rather expensive if you try
to buy it physically!), and it's the only place right now where you can
buy Wii games digitally.

Of course, Nintendo being Nintendo, next year they're going to shut down
this only place where you can buy Wii games digitally. I kind of wish I
had implemented this feature earlier so that people would've had ample
time to buy the games they want, but... better late than never, right?

I used MIT-licensed code from the NOD library as a reference when
implementing this. None of the code has been directly copied, but
you may notice that the names of the struct members are very similar.
c1635245b8/lib/DiscIONFS.cpp
2022-08-04 22:00:58 +02:00
Mai
b02653722d
Merge pull request #10856 from JosJuice/android-tv-user-data-2
Android: Add divider to landscape version of User Data activity
2022-08-03 20:24:54 -04:00
Mai
4617ee7d89
Merge pull request #10787 from JosJuice/channel-uri
Android: Add app link intent URI to channels projection
2022-08-03 20:21:45 -04:00
Mai
098fc8cadc
Merge pull request #10790 from JosJuice/android-wii-controller-magic
Android: Refactor reading "wiiController" preference
2022-08-03 20:21:11 -04:00
Mai
173337104f
Merge pull request #10919 from JosJuice/android-wait-on-fab-click
Android: Use AfterDirectoryInitializationRunner on FAB press
2022-08-03 14:22:42 -04:00
JosJuice
bab327eafa Android: Use AfterDirectoryInitializationRunner on FAB press
Without this, if the user finishes selecting a directory before
directory initialization finishes, MainPresenter.onDirectorySelected
will segfault when trying to read the MAIN_RECURSIVE_ISO_PATHS setting.

An alternative would be to use AfterDirectoryInitializationRunner
after the user selects the directory instead of before, but it might
be confusing for the user to deal with the usage statistics prompt
when they were expecting to add a folder.
2022-07-29 16:20:34 +02:00
JMC47
205d78d780 BBA - Rename BBA Built In to BBA (HLE)
All of our BBA options are technically built in, so it made the BBA
Built In option kind of confusing as to what it did.  So rename it to
BBA HLE to make it more clear what it is doing and why it doesn't need a
TAP.
2022-07-29 10:06:44 -04:00
JosJuice
3bd2bca385 Android: Add warning if graphics mods are not enabled 2022-07-23 21:58:45 +02:00
JosJuice
8f410bff15 Android: Add graphics mods support to CheatsActivity 2022-07-23 21:58:45 +02:00
JosJuice
45f6d36c45 Android: Split AbstractCheat into ReadOnlyCheat and AbstractCheat
ReadOnlyCheat will be used by graphics mods.
2022-07-23 17:21:52 +02:00
JosJuice
41a26f76fa Android: Add Cheat.supportsCode method
Patches, AR codes and Gecko codes have an associated code that the GUI
can show, but graphics mods don't.
2022-07-23 17:21:46 +02:00
JosJuice
98e2817802 Android: Add setting for enabling graphics mods 2022-07-23 17:21:45 +02:00
JMC47
3d7b66bcfc
Merge pull request #10861 from JosJuice/android-new-sd
Android: Bring SD card settings up to date with DolphinQt
2022-07-23 07:59:19 -04:00
JosJuice
a20d0e31d6 Android: Bring SD card settings up to date with DolphinQt 2022-07-23 13:28:34 +02:00
JosJuice
c0cf6f04dd Android: Add "Broadband Adapter (Built In)" to settings
This makes the feature added in 01ada3850f available in the Android GUI.
2022-07-23 11:33:03 +02:00
JosJuice
57f106d521
Merge pull request #10625 from codedwrench/xlink-kai-android-support
Android: XLink Kai Android UI option
2022-07-21 18:25:16 +02:00
codedwrench
98c688ee68 Android: XLink Kai Android UI option 2022-07-21 13:48:17 +02:00
JosJuice
01e4ce54c8 Android: Call WiimoteReal::InitAdapterClass before controller init
Should fix https://bugs.dolphin-emu.org/issues/12980.
2022-07-19 23:00:21 +02:00
JosJuice
dabad82219 Require frontend to initialize controllers
We currently have two different code paths for initializing controllers:
Either the frontend (DolphinQt) can do it, or if the frontend doesn't do
it, the core will do it automatically when booting. Having these two
paths has caused problems in the past due to only one frontend being
tested (see de7ef47548). I would like to get rid of the latter path to
avoid further problems like this.
2022-07-17 14:03:04 +02:00
JosJuice
c2b32916aa Android: Add subheadings to Wii config 2022-07-16 11:40:51 +02:00
JosJuice
4e7b0f2129 Android: Add divider to landscape version of User Data activity 2022-07-15 19:32:03 +02:00
JosJuice
9e97377690 Android: Refactor reading "wiiController" preference
This had a lot of duplicated code and magic numbers.
2022-06-27 11:20:25 +02:00
JosJuice
1d772176a2 Revert "Partially revert "Android: Clean up hardcoded platform names""
This reverts commit 98bdf3b1ce.
2022-06-27 08:31:06 +02:00
JosJuice
2b36587af7 Android: Add app link intent URI to channels projection
This a proper fix for https://bugs.dolphin-emu.org/issues/12561,
which was previously fixed by a hackfix in 98bdf3b1ce.
2022-06-27 08:30:27 +02:00
JosJuice
fafc78b9b5 Re-run code formatting after update to Android Studio 2022.2
Android Studio 2022.2 "Chipmunk" changes the code formatting rules a
little. Let's apply the new formatting in this PR so that the lint bot
doesn't take it out on innocent PRs.
2022-06-20 17:41:41 +02:00
JosJuice
dd0485389e AndroidManifest.xml: Re-add package="org.dolphinemu.dolphinemu"
Without this, debug builds of Dolphin fail to launch. The OS tries
to locate org.dolphinemu.dolphinemu.debug.DolphinApplication
but fails to find it because its actual name is
org.dolphinemu.dolphinemu.DolphinApplication.

Partially reverts 6b74907f9d.
2022-06-06 21:57:21 +02:00
Shawn Hoffman
5f3112653d android: downgrade AGP to 7.0.4
workaround for https://issuetracker.google.com/issues/232060576
2022-05-29 01:18:05 -07:00
Shawn Hoffman
863f14a6f7 android: update gradle to 7.4.2 2022-05-29 01:17:30 -07:00
Shawn Hoffman
ead78cc7e6 android: update constraintlayout to 2.1.4 2022-05-28 22:36:16 -07:00
Charles Lombardo
9224c099d4 Fix game card in landscape 2022-05-15 17:31:49 -04:00
Charles Lombardo
e03ee66ab5 Upgrade dependencies 2022-05-10 13:56:13 -04:00
Charles Lombardo
6b74907f9d Upgrade gradle to 7.2.0 2022-05-09 23:00:33 -04:00
JosJuice
31232f8c23
Merge pull request #10608 from t895/theme-refactor
Android: Modernize theming system
2022-05-08 11:37:35 +02:00
Charles Lombardo
c04835243f Replace deprecated method calls 2022-05-05 18:31:50 -04:00
Charles Lombardo
dcfa610319 Android: Sharpen icons
Create vector Wii and Gamecube icons and re-import default android icons as vector graphics. Scales better on a greater range of devices and takes up less space.
2022-04-26 15:01:56 -04:00
Charles Lombardo
9b7c5a4458 Android: Modernize theming system
themes.xml now contains a collection of colors, attributes, and styles. No visuals have changed, but this will allow for a more flexible theming system in the future for custom day/night/etc themes. This also removes a bunch of redundant code that can now be written as global styles and inherited themes.
2022-04-24 17:37:10 -04:00
Mai M
19c71db782
Merge pull request #10597 from Simonx22/fix-ingame-menu-design
Android: Fix in game menu rippleColor and colorEdgeEffect
2022-04-23 06:10:20 -04:00
Charles Lombardo
6eb9111657 Modernize game card
+Remove background on card
+Increase max # of lines for game title
+Root layout is now a linear layout with the card view rounding the corners on the box art
2022-04-22 22:01:14 -04:00
Simonx22
f5f52625b9 Android: Fix in game menu rippleColor and colorEdgeEffect 2022-04-20 16:22:06 -04:00
JosJuice
342af6512c Android: Use AfterDirectoryInitializationRunner more comprehensively
Should fix the crash reported in https://bugs.dolphin-emu.org/issues/12885
2022-04-16 15:04:29 +02:00
Pokechu22
4e9a314776 Round viewport coordinates when vertex rounding is enabled
This should fix https://bugs.dolphin-emu.org/issues/9105
2022-04-08 18:30:59 -07:00
Pokechu22
f6ab317374 Fix typo (GFX_HACK_VERTEX_ROUDING -> GFX_HACK_VERTEX_ROUNDING) 2022-04-08 18:30:59 -07:00
Mai M
f92b7f4c87
Merge pull request #10508 from JosJuice/android-pointer-down
Android: Only use getActionIndex for ACTION_POINTER_DOWN/ACTION_POINTER_UP
2022-04-08 20:53:52 -04:00
Mai M
e3106e8cdd
Merge pull request #10503 from JosJuice/android-directoryinitialization-thread
Android: Actually use a thread for DirectoryInitialization
2022-04-08 20:53:25 -04:00
Mai M
d4e4b56047
Merge pull request #10562 from JosJuice/android-double-tap-get
Android: Fix displaying the current value of double tap setting
2022-04-08 20:50:12 -04:00
JosJuice
17b17e3236
Merge pull request #10552 from Gamer64ytb/display-cutout
Android: Implement expand display cutout option.
2022-04-07 20:58:22 +02:00
JosJuice
4120870628 Android: Remove nonsense code from double tap setting dialog
The currentValue variable doesn't use InputOverlay.OVERLAY_
constants, it uses NativeLibrary.ButtonType constants.

Sigh, why do enums have to be so bad on Android that Google
recommends against using them :(

Anyway, simply not doing anything is a reasonable option here.
What happens then is that if the currently selected button is
invalid for the current controller, none of the available options
in the dialog will be pre-selected.
2022-04-05 19:08:58 +02:00
JosJuice
cdff426d23 Android: Fix displaying the current value of double tap setting 2022-04-05 18:58:29 +02:00
Gamer64ytb
bed91750e1 Android: Implement expand display cutout option.
Some ROMs don't have fullscreen feature, for example Pixel Experience, so have a option for that is better. Also you don't need put the app on fullscreen anymore with that.
2022-04-03 14:26:37 +02:00
JosJuice
57733ddc70 Android: Implement installing system update from disc image 2022-04-03 11:15:28 +02:00
Charles Lombardo
8a0c6816dd Android: Fix games list padding
Use clipToPadding="false" to prevent top white bar when scrolling
2022-03-28 09:58:01 -04:00
Mai M
c08a23b374
Merge pull request #10537 from Simonx22/android-sv2
Android: Increase target and compileSdk version to 32 (Android 12L/Sv2)
2022-03-27 15:14:48 -04:00
JosJuice
11c4385b36 Android: Mark MAIN_FALLBACK_REGION as not runtime editable
Trying to change it while a game is running does nothing.
DolphinQt already inactivates it while a game is running.
2022-03-27 18:45:01 +02:00
JosJuice
f12681ba93
Merge pull request #10532 from t895/material3-migration
Android: Inherit from Material 3 themes and round corners on box art
2022-03-27 18:32:22 +02:00
Charles Lombardo
b8013ff3a0 Android: Inherit from Material3 themes and round corners on box art 2022-03-26 14:54:23 -04:00
Simonx22
73f94e76b9 Android: Increase target and compileSdk version to 32 (Android 12L/Sv2) 2022-03-26 10:55:26 -04:00
Charles Lombardo
fde39b455c Begin style migration to Material3
Use large card view rounded corner guidelines

Fix action bar theming

Needed to import android back button clip art to fix material 3 theming issue. The DolphinSettingsBase style used to inherit from the Theme.MaterialComponents.DayNight.DarkActionBar theme which would provide the light text and icons but this is no longer available with Material 3.

Fit box art more snugly in CardView

Change card height to match cover art

Add padding to top of games list recyclerview
2022-03-26 10:16:17 -04:00
Admiral H. Curtiss
a3f83d92d1
Merge pull request #10515 from JosJuice/android-user-data-clarification
Android: Clarify what we mean by "user data"
2022-03-19 21:05:17 +01:00
JosJuice
c0f6aa7ab1 Android: Clarify what we mean by "user data" 2022-03-15 19:29:08 +01:00
JosJuice
f9f561ced1 Android: Update dependencies 2022-03-15 18:19:28 +01:00
JosJuice
f5b6cccd32 Android: Update Android Gradle Plugin 2022-03-15 18:19:07 +01:00
JosJuice
2e1f89025f Android: Only use getActionIndex for ACTION_POINTER_DOWN/ACTION_POINTER_UP
According to the documentation, getActionIndex should only be
used with ACTION_POINTER_DOWN and ACTION_POINTER_UP. We've had a
few crashes reported in the Play Console regarding invalid pointer
indices for getY, and I'm hoping this will help with that.
2022-03-12 21:20:00 +01:00
Pokechu22
37806472e1 GCAdapter: Defer initialization until MainWindow::InitControllers
If libusb fails to initialize, an assertion fails, but if that happens before the main window is created, then Dolphin just dies.  Now, the panic alert is properly shown and the user can ignore it.
2022-03-10 10:35:45 -08:00
JosJuice
da12ff02fc Android: Actually use a thread for DirectoryInitialization
`((Runnable) () -> init(context)).run()` is just a more complicated way
of writing `init(context)`, and doesn't on its own launch a thread.
2022-03-08 22:29:07 +01:00
JosJuice
8588272b3b Android: Set letterSpacing for savestate options
fbe7cf6 set this for most buttons in the in-game menu but missed
the savestate-related buttons and Unpause Emulation.
2022-02-27 22:45:21 +01:00
Admiral H. Curtiss
aa0ac83997
Merge pull request #10468 from JosJuice/sd-card-callback
Use config changed callback to detect SD insertion/ejection
2022-02-26 17:31:31 +01:00
Mai M
c474db9301
Merge pull request #10407 from JosJuice/android-reset-callback
Android: Call OnConfigChanged when resetting a setting
2022-02-26 11:24:18 -05:00
JMC47
75ad057b08
Merge pull request #10405 from JosJuice/android-no-boot-timeout
Android: Get rid of the boot timeout
2022-02-23 15:40:54 -05:00
JMC47
5da55c9e18
Merge pull request #10406 from JosJuice/android-mipmap-swap
Android: Fix swapped texture dumping description strings
2022-02-22 16:53:26 -05:00
JosJuice
2273742f9e Android: Get rid of LegacyBooleanSetting 2022-02-20 14:00:48 +01:00
JosJuice
90c576e075 Use config changed callback to detect SD insertion/ejection
This saves the GUI from having to manually call SDIO_EventNotify.
With that out of the way, we can let users change the
"Insert SD Card" setting on Android while a game is running.
2022-02-20 10:55:55 +01:00
JosJuice
1b76171a27 Android: Get rid of LegacyIntSetting
The only settings that were using LegacyIntSetting are now in the new
config system, so there's no reason to have LegacyIntSetting anymore.
2022-02-18 22:17:39 +01:00
Léo Lam
0c78167404
Merge pull request #10443 from JosJuice/port-wiimote-source
Port Wiimote source settings to the new config system
2022-02-18 21:38:02 +01:00
JosJuice
aff45c91fc Port Wiimote source settings to the new config system
This lets us finally get rid of BootManager's ConfigCache!
2022-02-18 21:27:10 +01:00
JosJuice
5dd07f73d4 Android: Fix the logic for getting the Riivolution path
There is a Load path setting, so the Load part can't just be hardcoded.
2022-02-09 21:43:52 +01:00
Simonx22
942da3ce5f Android: Optimize imports 2022-02-03 11:05:36 -05:00
JMC47
5e59561637
Merge pull request #10425 from JosJuice/android-import-path-traversal
Android: Fix path traversal when importing user data
2022-02-01 04:18:33 -05:00
JosJuice
8aef3e4711 Android: Fix path traversal when importing user data 2022-01-31 21:02:26 +01:00
JosJuice
e97fd2f19d Android: Include empty folders when exporting user data
I think users will have a hard time figuring out where to place
texture packs and Riivolution mods and so on without this.
2022-01-31 20:55:06 +01:00
JMC47
da05173f71
Merge pull request #10416 from JosJuice/android-import-export
Android: Add import/export options for user data
2022-01-30 17:41:13 -05:00
JosJuice
bf5cd90088 Android: Add import/export options for user data
Apparently there are phones where accessing Dolphin's app-specific
directory isn't just annoyingly hard but actually impossible.
To give users of those phones at least some kind of way to manage
their data (even if it's a lot less convenient than if we were
allowed to let the user open the app-specific directory in a
file manager), I'm adding a way to export the directory to a
zip file and then import it back.
2022-01-30 22:47:55 +01:00
Tilka
5d6a60b47c
Merge pull request #10391 from JosJuice/android-license-comment
Android: Add some missing license comments
2022-01-30 20:40:06 +00:00
Léo Lam
b32af33f24
Merge pull request #10409 from JosJuice/android-no-cplusplus-checks
Android: Get rid of __cplusplus macro checks
2022-01-30 18:55:36 +01:00
JosJuice
b8a6fcb1a7 Android: Get rid of __cplusplus macro checks
These files cannot compile correctly as C, so there's no reason to have
ifdefs for C compatibility.

We switched to not checking the __cplusplus macro in our JNI code some
time ago, but it seems like I forgot to remove it from these two files.
2022-01-29 18:38:55 +01:00
JosJuice
e101c5aaf3 Android: Fix incorrect include of PostProcessing.h 2022-01-29 18:30:11 +01:00
JosJuice
7f32057e91 Android: Call OnConfigChanged when resetting a setting
Otherwise the value of the setting won't be updated properly.
2022-01-29 15:49:03 +01:00
JosJuice
c5c011dd12 Android: Fix swapped texture dumping description strings 2022-01-29 14:36:28 +01:00
JosJuice
07f2587e63 Android: Get rid of the boot timeout
We don't have a timeout like this on other platforms, and it doesn't
accomplish anything useful as far as I can tell. If you trigger it,
all that happens is that you don't get a working game and also can't
press Exit Emulation without Dolphin hanging (stuck in Core::Shutdown).
2022-01-29 11:15:04 +01:00