Commit graph

1307 commits

Author SHA1 Message Date
Mai
11281b5cef
Merge pull request #11017 from JosJuice/saf-custom-cover
Android: Fix reading custom covers with SAF
2022-09-01 00:27:28 -04:00
Charles Lombardo
940a38f172 Android: App redesign with multi-theme system 2022-08-31 18:01:15 -04:00
JosJuice
40d6d615e2 Android: Fix reading custom covers with SAF
If GameFile.getCustomCoverPath returns a mangled URI, we need to
unmangle it before passing it to Picasso, since Picasso has no
concept of Dolphin's mangled URIs.
2022-08-29 18:48:20 +02:00
JosJuice
b6ac63dc47
Merge pull request #11000 from t895/monochrome
Android: Use vector icon and enable monochrome icon
2022-08-24 17:38:59 +02:00
Charles Lombardo
7659753924 Android: Update target SDK version 2022-08-22 19:14:43 -04:00
Charles Lombardo
2caa1f3b43 Android: Add option to disable game cover text 2022-08-22 13:50:39 -04:00
Charles Lombardo
3814fab9ec Android: Use vector icon and enable monochrome icon 2022-08-22 07:54:57 -04:00
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
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
codedwrench
98c688ee68 Android: XLink Kai Android UI option 2022-07-21 13:48:17 +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
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
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
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
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
JosJuice
c5c011dd12 Android: Fix swapped texture dumping description strings 2022-01-29 14:36:28 +01:00
Simonx22
5a4d838e7b Android: Fix in-game menu font spacing and checkbox margin 2022-01-28 16:29:42 -05:00
JMC47
c2bf3a4313
Merge pull request #10393 from JosJuice/android-texcache-names
Android: Make texture cache accuracy level names match DolphinQt
2022-01-27 14:42:45 -05:00
JosJuice
a8c5c9dffc
Merge pull request #10361 from Simonx22/migrate-to-material-components
Android: improve app design
2022-01-26 22:39:09 +01:00
JosJuice
9d8c207aaf Android: Make texture cache accuracy level names match DolphinQt 2022-01-24 22:18:57 +01:00
JosJuice
b237c7479e
Merge pull request #10371 from lynxnb/android-ir
Android: add two QoL settings to IR pointer
2022-01-24 18:25:13 +01:00
lynxnb
b4edd16f24 Android: add an option to recenter IR after every pointer interaction 2022-01-24 12:03:51 +01:00
lynxnb
fe9ac4ed1d Android: add IR pointer modes to InputOverlayPointer
* Disabled: disables the overlay pointer
* Follow: default behaviour, IR pointer follows touch position
* Drag: IR pointer moves relative to the initial touch event position
2022-01-24 12:03:51 +01:00
JosJuice
fbc71a28c3 Android: Add some missing license comments
I missed this in code review.
2022-01-23 22:14:51 +01:00
JMC47
237947e2f1
Merge pull request #10369 from Simonx22/android-online-system-update-2
Android: Add online system update functionality
2022-01-22 14:46:42 -05:00
Simonx22
c6a074ca64 Android: improve app design 2022-01-21 19:23:27 -05:00
Simonx22
55378cab39 Android: Add online system update functionality 2022-01-21 17:23:09 -05:00
OatmealDome
8ad1292df7 NativeLibrary: Add function to start system menu 2022-01-21 17:23:05 -05:00
OatmealDome
30d51348f9 WiiUtils: Add function to get current system menu version 2022-01-21 17:19:14 -05:00
OatmealDome
36257f7f42 WiiUtils: Add function to check if system menu is installed 2022-01-21 17:18:38 -05:00
OatmealDome
2fc7671eaf WiiUtils: Add doOnlineUpdate() function 2022-01-21 17:17:42 -05:00
OatmealDome
19e1809cdf WiiUtils: Add function to convert UpdateResult to jint 2022-01-21 17:16:23 -05:00
OatmealDome
7c86baee50 WiiUpdateCallback: Add interface for update callback 2022-01-21 17:14:16 -05:00
Mai M
cfb8b9bcf4
Merge pull request #10357 from JosJuice/android-main-debug
Android: Make Main.Debug setting declarations match C++
2022-01-13 07:41:35 -05:00
Mai M
7ebc689b57
Merge pull request #10360 from JosJuice/android-div-6
Android: Don't divide SI device by 6
2022-01-13 07:41:08 -05:00
JosJuice
9f3ed1f9f3 Android: Don't divide SI device by 6
It's a complete coincidence that both SIDEVICE_GC_CONTROLLER (6)
and SIDEVICE_WIIU_ADAPTER (12) are divisible by 6. Dividing
by 6 because of that doesn't make sense, especially not if we
want to add support for more kinds of SI devices on Android later.
2022-01-08 16:06:49 +01:00
Simonx22
0a82bb51bd Android: remove save icon and add up button 2022-01-07 16:23:06 -05:00
JosJuice
13e246a843 Android: Make Main.Debug setting declarations match C++
No functional difference. Just making sure that the settings
have the same name in Java as in C++ so that they're easy to
cross-reference.
2022-01-07 11:25:20 +01:00
Simonx22
ba5c38e3ad Android: update dependencies 2022-01-06 05:55:52 -05:00
Mai M
c16b8f4200
Merge pull request #10212 from JosJuice/android-12
Android: Increase targetSdkVersion to 31 (Android 12)
2022-01-06 04:01:00 -05:00
JMC47
500e02dcfb
Merge pull request #10344 from JosJuice/android-no-retain-instance
Android: Remove all setRetainInstance calls
2022-01-04 10:39:22 -05:00
JosJuice
014cc02b96 Android: Fix country constants in CoverHelper.getRegion
This code seems to have been written as if GameFile.getCountry
returns a language rather than a country, which is wrong.
2021-12-28 17:16:49 +01:00
JosJuice
75bf008aba Android: Make WFS directory configurable
The Android version of 5ecd5f0. No scoped storage support, though...
2021-12-24 11:30:09 +01:00
JMC47
820a424dcd
Merge pull request #10272 from JosJuice/android-intent-uri
Android: Rework intent handling to work under scoped storage
2021-12-20 14:30:16 -05:00
JosJuice
a8a8b294cd Android: Remove all setRetainInstance calls
Our reasons for using setRetainInstance were gotten rid of in PRs
9011 and 10008, so let's remove our calls to this deprecated method.
2021-12-19 14:45:51 +01:00
Mai M
66fc335c11
Merge pull request #10276 from JosJuice/android-fix-file-manager
Android: Fix opening system file manager
2021-12-15 00:03:16 -05:00
JosJuice
974c7f4f86 Android: Fix opening system file manager
Turns out that most phones ship with a special Google version of
DocumentsUI instead of just using the AOSP version, despite the two
being pretty similar as far as I can tell. This change makes us
check for both package names instead of just the AOSP package name.
2021-12-14 18:34:50 +01:00
JosJuice
41c7e1116a Android: Rework intent handling to work under scoped storage 2021-12-14 18:25:42 +01:00
Admiral H. Curtiss
da161faff4
GameList: Show game mod descriptor .json files in game list. 2021-12-12 21:26:09 +01:00
Mai M
15ff70baba
Merge pull request #10231 from JosJuice/android-dir-init-livedata
Android: Make DirectoryInitialization use LiveData
2021-11-21 21:07:17 -05:00
Mai M
05ecff199f
Merge pull request #10232 from JosJuice/android-minify
Android: Enable R8 code shrinking
2021-11-21 04:50:03 -05:00
JosJuice
77aa2cd04e Android: Add MMU setting to GUI
Now that we have fast MMU emulation on AArch64, there's no
reason to keep excluding this from the GUI like we've been doing.
2021-11-21 09:38:56 +01:00
JosJuice
c2aa2818be Android: Make rescan on app start work again
I haven't fully confirmed why the previous commit broke this,
but I imagine it's due to AfterDirectoryInitializationRunner
executing in a different order than before, resulting in
startRescan running before startLoad.
2021-11-19 22:58:05 +01:00
JosJuice
bb475391d2 Android: Make DirectoryInitialization use LiveData
Gets rid of all remaining uses of the deprecated LocalBroadcastManager.
2021-11-19 22:58:05 +01:00
JosJuice
d3a23fe5c2 Android: Enable R8 code shrinking
This decreases our APK size by a few megabytes. Most of the reduction
is from Java libraries that we only use small parts of. Code shrinking
gets rid of all the unused code from these libraries from the APK.

Because I highly value the ability to get stack traces that make
sense, I have specifically disabled obfuscation (automatic renaming
of symbols to short incomprehensible names).

I've only enabled code shrinking for release builds, purely because
I feel like the extra build time (30 seconds on my machine)
would be annoying when you want to make debug builds rapidly.
2021-11-19 22:56:34 +01:00
JMC47
6f4bbac528
Merge pull request #9956 from Pokechu22/non-power-of-2-wrap-2
VideoCommon: Manually handle texture wrapping and sampling
2021-11-18 13:08:23 -05:00
Pokechu22
95b9941044 Use Fast Texture Sampling by default
This commit changes the default value of Fast Texture Sampling to true, and also moves the setting that controls it to the experimental section of the advanced tab.  This is its own commit so that it can be easily reverted when we want to default to Manual Texture Sampling.

Co-authored-by: JosJuice <josjuice@gmail.com>
2021-11-17 21:29:57 -08:00
Pokechu22
93eea7cb13 VideoCommon: Add option to use old behavior (Fast Texture Sampling)
Co-authored-by: JosJuice <josjuice@gmail.com>
2021-11-17 21:27:32 -08:00
JosJuice
2941cf8d94 Android: Make GameFileCacheManager use LiveData, part 2
Gets rid some uses of the deprecated LocalBroadcastManager.

One note about the changes in GameFileCacheManager itself:
The change from compareAndSet to getValue followed by
setValue is actually safe, because startLoad and startRescan
only run from the main thread, and only the main thread ever
sets the flags to true. So it's impossible for any other thread
to change the flag in between the getValue and the setValue.
2021-11-17 21:49:51 +01:00
JosJuice
857963b336 Android: Make GameFileCacheManager use LiveData, part 1 2021-11-17 21:29:11 +01:00
Mai M
b14d982d36
Merge pull request #10225 from JosJuice/android-game-settings-title
Android: Properly set game settings title when navigating backwards
2021-11-16 23:26:38 -05:00
JosJuice
bb2ee279cd Android: Properly set game settings title when navigating backwards 2021-11-16 22:09:40 +01:00
JosJuice
ffd8cd059c Android: Make GameFileCacheService not be a service
The past few Android releases have been adding restrictions
to what services are allowed to do, for the sake of stopping
services from using up too much battery in the background.
The IntentService class, which GameFileCacheService uses,
was even deprecated in Android 11 in light of this.

Typically, the reason why you would want use a service instead of
using a simple thread or some other concurrency mechanism from the
Java standard library is if you want to be able to run code in the
background while the user isn't using your app. This isn't actually
something we care about for GameFileCacheService -- if Android wants
to kill Dolphin there's no reason to keep GameFileCacheService
running -- so let's make it not be a service.

I'm changing this mainly for the sake of future proofing, but there
is one immediate (minor) benefit: Previously, if you tried to launch
Dolphin from Android Studio while your phone was locked, the whole
app would fail to launch because launching GameFileCacheService
wasn't allowed because Dolphin wasn't considered a foreground app.
2021-11-16 21:45:06 +01:00
JosJuice
31bfbca923 Android: Split up GameFileCacheService.onHandleIntent 2021-11-16 21:15:49 +01:00
JosJuice
7292ac0ce5 Android: Remove DirectoryInitialization from AndroidManifest.xml
It isn't a service, so it shouldn't be listed as one.
2021-11-15 23:23:17 +01:00
JosJuice
51034ac2dc Android: Increase targetSdkVersion to 31 (Android 12)
Unlike with Android 11, there should be no downsides to doing
this, so we might as well get this out of the way early.
The main part of the work was already done in 5a1a642.
2021-11-14 10:45:15 +01:00
JosJuice
5a23d5cedf Android: Bump NDK and CMake versions
This should make C++20 and std::filesystem work. (Not that
we really can use std::filesystem much on Android since
it doesn't work with scoped storage...)
2021-11-13 20:41:11 +01:00
JosJuice
8b0624f53e Android: Show SD root path in Riivolution activity 2021-10-30 23:24:37 +02:00
JosJuice
22a1f3422c Android: Add Riivolution patch configuration 2021-10-30 23:24:37 +02:00
JosJuice
34021b5ebc Android: Allow starting game with Riivolution patches from the GUI 2021-10-30 23:24:36 +02:00
Léo Lam
e4cc1672a2
Merge pull request #10185 from JosJuice/android-fragile
Android: Set android:hasFragileUserData
2021-10-24 22:27:37 +02:00
JosJuice
d39150c368 Android: Set android:hasFragileUserData
This makes Android ask the user whether they want to delete user
data when uninstalling the app instead of always deleting user data,
which is pretty great now that we're forced to use scoped storage.
It only works on Android 10 and up, though.
2021-10-24 21:39:09 +02:00
Pokechu22
04d8cdfe88 Convert LOG_TYPE and LOG_LEVELS to enum class 2021-10-24 11:48:36 -07:00
JosJuice
ab735293b1 Android: Adjust string about file manager apps on Android 11
When I made 9c8bb24, I assumed it was completely impossible for a
non-preloaded app to access the entirety of the Android/data/ folder
on Android 11. This turned out to be false. While you can't access
the directory without using SAF (even if you have the Manage All
Files permission), and the user can't navigate to the folder using
the SAF folder picker, what you can do is pass the Android/data/
folder as an EXTRA_INITIAL_URI to the SAF folder picker. If the
user then presses "use this folder" without navigating out of the
folder, the app will be able to access the folder using SAF.

So what does that mean for Dolphin? It means scoped storage is a
little less bad than I feared, and I have a string to adjust.
2021-10-20 21:54:22 +02:00
JosJuice
6caf51f966
Merge pull request #9696 from JosJuice/android-scoped-storage
Android: Scoped storage [To be merged in October]
2021-10-15 18:17:16 +02:00
JosJuice
800bed330a Android: Add the advanced graphics settings to the GUI 2021-10-04 23:19:14 +02:00
JosJuice
9bb85ca706 DolphinQt/Android: Add warning when converting NKit files
Yes, that's right! It's time to add even more NKit warnings,
because users still don't understand what NKit is or how it works!

More specifically, some users seem to be under the impression that
converting an NKit file to for instance RVZ using Dolphin's convert
feature will result in a normal RVZ file, when it in fact results in
an NKit RVZ file (since NKit is not a container format in the sense
that GCZ/WIA/RVZ/WBFS/CISO is, but rather a kind of trimmed ISO).
I can hardly blame users for not knowing this, because it's not
intuitive unless you know the technical details of how NKit works.
2021-10-02 11:09:36 +02:00
JosJuice
53d7d595e6 Android: Remove the EmulationState class
The purpose of this class was to keep track of state which the
emulation core was already keeping track of. This is rather risky -
if we update the state of one of the two without updating the other,
the two become out of sync, leading to some rather confusing problems.

This duplicated state was removed from EmulationState in the
previous commits, so now there isn't much left in the class.
Might as well move its members directly into EmulationFragment.
2021-09-21 16:34:00 +02:00
JosJuice
2cd09b8eb3 Android: Remove synchronized keywords from EmulationState
These methods are only being called from the GUI thread anyway...
2021-09-21 16:33:59 +02:00
JosJuice
3eb07e9772 Android: Don't rely on onPause for pausing before destroying surface
Fixes a crash which was uncovered (or just made more likely?)
by the previous commit.
2021-09-21 16:33:57 +02:00
JosJuice
446e2d9119 Android: Remove state from EmulationState 2021-09-21 16:32:47 +02:00
JosJuice
2c564a0b9d Android: Remove mSurface from EmulationState 2021-09-21 16:31:55 +02:00
JosJuice
a3ce8d61fd Android: Show confirmation dialog for clearing game settings 2021-09-18 12:35:46 +02:00
JosJuice
4e7aaba77a Android: Add button for opening system file manager
Apparently some phones (at least some from Samsung) don't expose the
system file manager in the system settings despite it being the
only on-device file manager that can open app-specific directories...
2021-09-16 20:12:20 +02:00
JosJuice
9c8bb24293 Android: Add a "user data" screen
To make it clearer for users where Dolphin is storing user data,
now that there's more than one possible place.
2021-09-16 20:12:20 +02:00
JosJuice
258832dad4 Android: Enable backup of external app-specific directory 2021-09-16 20:12:20 +02:00
JosJuice
6119f77626 Android: Increment targetSdkVersion to 30 (Android 11)
This enables scoped storage for new Dolphin installs on Android 11
and up (along with a few other changes in behavior which unlike
scoped storage are uncontroversial). Existing installs are unaffected.

We have to do this in order to be able to release updates on
Google Play from November 2021 and on.
2021-09-16 20:12:20 +02:00
JosJuice
3adb07ac74 Android: Show a dialog for scoped storage incompatible settings
The following settings are currently not SAF compatible,
and might never be due to the performance impact:

Dump Path
Load Path
Resource Pack Path
Wii NAND Root

This commit makes us show a message to the user if they try to
change one of these settings while scoped storage is active.
I don't want to entirely remove the settings from being listed
in the settings activity, because it's important that the user
is able to reset them if they were set to something custom in
a previous version of Dolphin.
2021-09-16 20:12:20 +02:00
JosJuice
820420c5f5 Android: Use app-specific directory as User folder by default
This lets Dolphin function without the user granting access to
external storage. We need this for scoped storage compatibility.

When scoped storage is not active, we still ask for permission to
access external storage the first time the app is started so that
we can use the existing dolphin-emu folder if there is one. But
if it doesn't exist, or the user denies the permission, or scoped
storage is active, the app-specific directory will be used instead.
2021-09-16 20:01:47 +02:00
JosJuice
0ca4c6dbd4 Android: Add save button to cheats activity
By request. Matches the settings activity.
2021-09-16 18:48:40 +02:00
JosJuice
ffa25c4cf5 Android: Allow $ line when entering cheat code
Port of cda442d.
2021-09-16 18:48:40 +02:00
JosJuice
53ae1a0725 Android: Add Gecko code downloading 2021-09-16 18:48:39 +02:00
JosJuice
47efd3317d Android: Fix CheatsActivity d-pad navigation
Special shoutout to Android for not having RTL compatible
variants of nextFocusRight and nextFocusLeft.

Ideally we would have some way to block the user from using
the d-pad to switch between the two panes when in portrait mode,
or make the list pane act as if it's to the left of the details
pane rather than the right when the details pane is open, but I
don't know of a good way to do this. SlidingPaneLayout doesn't
really seem to have been implemented with d-pad navigation in mind.
Thankfully, landscape is the most important use case for gamepads.
2021-09-16 18:48:39 +02:00
JosJuice
215492152c Android: Show warning when Enable Cheats is off 2021-09-16 18:48:39 +02:00
JosJuice
1470dfcf81 Android: Add the ability to delete cheats 2021-09-16 18:48:39 +02:00
JosJuice
404eb13e2f Android: Add the ability to add cheats 2021-09-16 18:48:39 +02:00
JosJuice
6934b9a21d Android: Add headers to cheat list 2021-09-16 18:48:38 +02:00
JosJuice
109aef4b81 Android: Scroll to field with error when error occurs 2021-09-16 18:48:38 +02:00
JosJuice
e299be1d85 Android: Add creator and notes fields for Gecko codes 2021-09-16 18:48:38 +02:00
JosJuice
883a9f8a99 Android: Allow viewing/editing the actual codes 2021-09-16 18:48:38 +02:00
JosJuice
fc6c31c3db Android: Update cheat list when a cheat is edited
The way I'm implementing events using LiveData feels rather
unorthodox, but I'm not aware of anything in the Android framework
that would let me do it in a better way... One option I did
consider was wrapping the cheat lists in LiveData and observing
those, but then CheatsAdapter wouldn't know which cheat had
changed, only that there was some kind of change to the list,
necessitating the use of the not recommended notifyDataSetChanged.
2021-09-16 16:46:50 +02:00
JosJuice
43dcbf33ad Android: Add edit button for cheats 2021-09-16 16:46:49 +02:00
JosJuice
a303b4bc98 Android: Programmatically open/close cheat details
Only has an effect when using a narrow screen.
2021-09-16 16:46:49 +02:00
JosJuice
95879c2e76 Android: Add details view for cheats
The details view only contains the name of the cheat for now.
2021-09-16 16:46:49 +02:00
JosJuice
93a1271386 Android: Add checkboxes for toggling cheats enabled 2021-09-16 16:46:49 +02:00
JosJuice
67a8855d9a Android: Add "Enable Cheats" setting to GUI 2021-09-16 16:46:49 +02:00
JosJuice
4d609c769f Android: Implement basic read-only cheats list 2021-09-16 16:46:48 +02:00
JosJuice
ee3a5a4a81 Android: Create CheatsActivity 2021-09-16 16:46:48 +02:00
JosJuice
719930bb39 Android: Add fast path to addOrGet
This path isn't really any faster in the normal case,
but it does let us skip waiting for the lock to be available,
which makes a huge difference if the lock is already taken.
2021-08-24 15:35:40 +02:00
JosJuice
fb265b610d Android: Don't hold gameFileCache lock during updateAdditionalMetadata
It seems like we spend a lot of the game list scanning time in
updateAdditionalMetadata, which I suppose makes sense considering
how many different files that function attempts to open.

With the addition of just one little atomic operation, we can make
it safe to call updateAdditionalMetadata without holding a lock.
2021-08-24 15:35:39 +02:00
JosJuice
bba33c7ced Android: Don't hold gameFileCache lock while finding games
FindAllGamePaths may take a little while, and holding the
gameFileCache lock isn't actually necessary until it's time to
put the results returned by FindAllGamePaths into gameFileCache.

The downside of this change is that we have to do an extra
round of JNI in between FindAllGamePaths and Update,
but I don't think that's much of a problem.
2021-08-24 14:56:33 +02:00
JosJuice
a4e5d233be
Merge pull request #9864 from PEmu2/wiimote
Change "Wiimote" to "Wii Remote" in interface
2021-08-07 12:44:55 +02:00
Simonx22
9a33fd3f7f Android: update dependencies 2021-07-25 16:23:18 -04:00
JosJuice
3accb06fe1 Android: Allow non-square overlay control images
This removes an assumption in the code which made every overlay control
image be scaled to a square even if the actual image was rectangular.
2021-07-23 13:16:27 +02:00
JosJuice
f70df930a6 Android: Adjust DSP selection names
The Android strings were not updated in 59e6048 along with the
DolphinQt strings.
2021-07-23 08:57:39 +02:00
Léo Lam
be0163b7ad
Merge pull request #9841 from JosJuice/revert-9835
Partially revert "Android: Clean up some hardcoded strings"
2021-07-06 13:07:50 +02:00
Mai M
ffdc8538a1
Merge pull request #9862 from delroth/spdx-tags
Use SPDX for Dolphin licensing info
2021-07-06 01:02:57 -04:00
Léo Lam
ccc2b7bd25
Merge pull request #8416 from JosJuice/shader-compilation-names
Change the names for shader compilation settings
2021-07-06 01:41:27 +02:00
PEmu2
84e3078307
Change "Wiimote" to "Wii Remote" in interface 2021-07-04 22:27:36 -07:00
Pierre Bourdon
eb119488ea
licensing: add missing license info to many Java files 2021-07-05 04:43:55 +02:00
Pierre Bourdon
e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
JosJuice
98bdf3b1ce Partially revert "Android: Clean up hardcoded platform names"
This partially reverts commit cbc4989095
due to a crash: https://bugs.dolphin-emu.org/issues/12561

I can't debug what the cause of the crash is due to not having an
Android TV device. Let's just revert this for now to fix the crash.
2021-06-30 09:02:23 +02:00
JosJuice
515d02fe26 Android: Add Fallback Region setting to GUI 2021-06-26 11:45:22 +02:00
Léo Lam
4979974a57
Merge pull request #9828 from JosJuice/android-pressed-opacity
Android: Apply opacity setting to pressed buttons too
2021-06-24 01:36:02 +02:00
Mai M
be2ec728e4
Merge pull request #9836 from JosJuice/android-getemulationactivity
Android: Don't use getEmulationActivity in GCAdapter/Wiimote code
2021-06-22 11:59:25 -04:00
JosJuice
1a47780ab4 Android: Don't use getEmulationActivity in GCAdapter/Wiimote code
The app context should work just as well as an activity context.

Also moving a hardcoded string to strings.xml.
2021-06-22 15:25:51 +02:00
JosJuice
0cfd36495b Android: Store HomeScreenChannel's appLinkIntentUri as Uri
Cleanup of some code touched by the previous commit.
2021-06-22 15:12:03 +02:00
JosJuice
cbc4989095 Android: Clean up hardcoded platform names
The same kind of change as the changes made in the previous
commit, but this change is more involved, in particular because
of how SyncProgramsJobService was using display names as keys.
2021-06-22 15:12:03 +02:00
JosJuice
5b8fe1e748 Android: Clean up some hardcoded strings
These would lead to problems if we ever add translation support.
2021-06-22 15:12:03 +02:00
JosJuice
1b3f05628b Android: Remove check for missing game ID
Now that DOL and ELF files are assigned game IDs, all games have
game IDs. (Unless you intentionally craft an ISO file that has
the first bytes set to null, but if you do that I think you can
live with Dolphin creating a file in GameSettings called ".ini")
2021-06-22 14:01:06 +02:00
JosJuice
d33efc37af Android: Apply opacity setting to pressed buttons too 2021-06-19 16:28:25 +02:00
JosJuice
d304d75aa5 Android: Stop using custom path for GameFileCache
Back when I wrote this code, I believe I set it to use a custom path
so that the cache would end up in a directory which Android considers
to be a cache directory. But nowadays the directory which Dolphin's
C++ code considers to be the cache directory is such a directory,
so there's no longer any reason to override the default path.
2021-06-08 18:34:40 +02:00
JosJuice
d42cec0d19 Android: Fix WAD import crashing
progressMessage can have the invalid value of 0. That
progressMessage was being used for the thread name was
a typo anyway – it's supposed to use progressTitle.
2021-06-07 23:09:29 +02:00
JosJuice
82e9c1c68a Android: Disable building unit tests by default
This reduces the build time for incremental builds from about
2 minutes to about 20 seconds. Most people never run the
unit tests on Android anyway (I'm not aware of anyone other
than me ever having done it).
2021-05-25 22:54:13 +02:00
Mai M
1d175e7e13
Merge pull request #9728 from JosJuice/android-get-shader-list
Android: Use JNI for getting post-processsing shaders
2021-05-20 11:16:08 -04:00
JosJuice
69626f1726 Android: Remove getDolphinInternalDirectory
I was going to rename this to getSysDirectory to make it clearer
what the returned path actually is, but it turns out we're not
actually using this for anything anymore.
2021-05-20 16:48:33 +02:00
JosJuice
b7ba126db0 Android: Use JNI for getting post-processsing shaders
The Java implementation of getting the list of post-processing
shaders only looked in the Sys folder and not the User folder.
This could be fixed in the Java implementation, but it's
simpler to just call the C++ implementation instead.
2021-05-20 16:43:03 +02:00
Dentomologist
4f31eaadc5 GameList: Minor improvements to android and low res nobanner images
Center @2x and android banners, and adjust @1x banner to improve
consistency with other resolutions while maintaining sharpness.

Images created by MayImilae
2021-05-19 12:43:55 -07:00
MayImilae
509d7eac2d Adjust Onscreen Buttons Opacity
Update Onscreen Buttons Opacity and Adjust Default Opacity Setting
2021-05-16 21:51:58 -07:00
Mat M
80ac36a712
Merge pull request #9701 from sspacelynx/master
Android: bump gradle & dependencies version
2021-05-13 06:41:01 -04:00
sspacelynx
ac77f8207e Android: bump gradle & dependencies version
jecenter() is EOL, so swap that out with mavenCentral()
2021-05-10 12:35:50 +02:00
JosJuice
c5491e8205 Android: Remove CheckBoxSettingViewHolder's log setting name hack 2021-05-09 17:11:37 +02:00
JosJuice
a8f48feddb Android: Use CharSequence for SettingsItem name/description 2021-05-09 17:02:22 +02:00
JosJuice
c2917417fe Android: Don't set android:debuggable="true"
In 5a1a642, I explicitly set android:debuggable="true" for Dolphin.
(By default, it's set for debug builds but not release builds.)
The reason I made the change is because debuggable must be set to
true in order to allow adb backup to be used with apps which target
Android 12. We have no reason to want to stop users from debugging
Dolphin and certainly no reason to stop users from using adb backup
(especially not after forced storage is going to force us to store
the User folder in app-specific external storage!), but,
it turns out that setting debuggable to true is forbidden by
Google Play "for security reasons". Go figure. The beta build
which was tagged earlier today was rejected because of this.
2021-05-06 20:15:27 +02:00
JosJuice
a2c8050eba DolphinQt/Android: Unify the JIT naming scheme
I think the AArch64 JIT has come far enough that it doesn't have to
be called experimental anymore.

I'm also labeling the x86-64 JIT as x86-64 for consistence with the
AArch64 JIT. This will especially be helpful if we start supporting
AArch64 on macOS, as AArch64 macOS can run both the x86-64 JIT and
the AArch64 JIT depending on whether you enable Rosetta 2.
2021-04-25 17:19:50 +02:00
Léo Lam
cf80ed7f2d
Merge pull request #9653 from JosJuice/android-import-nand
Android: Add "Import BootMii NAND Backup"
2021-04-19 21:57:40 +02:00
JosJuice
ceacd0930b Android: Add "Import BootMii NAND Backup" 2021-04-19 21:38:22 +02:00
JosJuice
5a1a642495 Android: Early changes to adapt for Android 12
We don't actually need to do this until we bump targetSdkVersion
to Android 12 (which we can't do yet since we're not compatible
with scoped storage), but I figured I'd get it out of the way early.

Not tested on Android 12, but tested to not break stuff on Android 10.
2021-04-18 18:33:43 +02:00
JosJuice
05a37746b6 Change the names for shader compilation settings 2021-04-10 12:46:49 +02:00
LC
7a16231e98
Merge pull request #9614 from JosJuice/okay-fine-i-give-in
Android: Add "Synchronize GPU Thread" setting (SyncOnSkipIdle/SyncGPU)
2021-03-28 09:29:08 -04:00
LC
18e7009db2
Merge pull request #9613 from JosJuice/android-delete-game-ini-more
Android: Expand the game INI deletion prompt
2021-03-28 09:28:26 -04:00
JosJuice
ed5e61a250 Android: Add "Synchronize GPU Thread" setting (SyncOnSkipIdle/SyncGPU)
Many Android users want to disable SyncOnSkipIdle as a performance
hack, to the point where it's often suggested as something to
paste into Dolphin.ini (if not to use a fork). If adding it as
a setting in the GUI gives us an opportunity to explain what the
setting actually does and stops people from pasting stuff they
don't understand into INI files, I think it can be worth adding
despite how it can make games unstable. It not being in the GUI
doesn't seem to be stopping people from disabling it anyway.

The added setting in the GUI is a three-way setting called
"Synchronize GPU Thread" with the following alternatives:

"Never":            SyncGPU = False, SyncOnIdleSkip = False
"On Idle Skipping": SyncGPU = False, SyncOnIdleSkip = True
"Always":           SyncGPU = True,  SyncOnIdleSkip = True
2021-03-28 15:10:57 +02:00
JosJuice
3a2fcf9fc6 Android: Expand the game INI deletion prompt
See PR 8203 for background on the game INI deletion prompt.

It's been almost two years since PR 8203 was merged, so you
would think that people are no longer creating game INIs that
contain a copy of every global setting, right? Unfortunately,
MMJ was forked not too long before that and never backported the
change, so right now there's a not insignificant number of people
online posting game INIs full of this garbage for others to use.

One thing that's been missing from the game INI deletion prompt
is a description of what the problem with having tons of extra
lines in a game INI actually is. This change adds that, in the
the hope that it will make people ignore the warning less often.
2021-03-28 14:11:09 +02:00
JosJuice
e677f641a0 Android: Rename "Enable Logging" to "Write Logs to File"
This option does in fact not enable and disable logging as a whole.
You can get logs through logcat regardless of this setting.

Also taking the opportunity to remove the reference to
the "dolphin-emu" folder name since we will no longer be
using that folder once scoped storage is applied to Dolphin.
2021-03-28 13:57:52 +02:00
LC
210ddcf5ee
Merge pull request #9592 from JosJuice/android-launch-rescan
Android: Fix rescanning on first app launch after cache clear
2021-03-22 14:34:02 -04:00
LC
14cff8dc3a
Merge pull request #9599 from JosJuice/android-gfx-hacks-settings
Android: Add some missing settings to Hacks section of Graphics
2021-03-22 14:33:32 -04:00
JosJuice
1a88656cce Android: Limit the height of the in-game menu's game title
If the title is too long, there may not be much space left
for the actual menu items.
2021-03-19 21:51:17 +01:00
JosJuice
8fa5f67277 Android: Make the in-game menu scrollbar wider
It was still rather hard to notice, even with autohide disabled.
2021-03-19 21:38:04 +01:00
JosJuice
e2c8b3a317 Android: Add some missing settings to Hacks section of Graphics
This brings the available settings in the Hacks section
in line with DolphinQt.
2021-03-19 21:01:26 +01:00
JosJuice
ac65c7970c Android: Fix rescanning on first app launch after cache clear
GameFileCacheService.startRescan (in MainPresenter.onResume)
does nothing if called before GameFileCacheService.startLoad.
Fixes a 3f71c36 regression where already added games would not
show up after app launch under specific circumstances.

Unfortunately the loading indicator still doesn't show up
during a rescan initiated by app launch, but that would
be more annoying to fix, so I will leave it for now.
2021-03-16 22:58:23 +01:00
JosJuice
fcb19a228b Android: Fix recreating main activity
4752ec8 broke this because I wasn't aware that a fragment
has to have a constructor with no parameters in order for
activity recreation to work.
2021-03-15 21:44:09 +01:00
Léo Lam
ac687bc364
Merge pull request #9568 from JosJuice/android-delay-save-tab
Android: Don't save settings immediately after switching platform tab
2021-03-07 12:03:46 +01:00
JosJuice
13cc327909 Android: Don't save settings immediately after switching platform tab
We want to save the currently selected platform tab,
but doing so immediately after switching tabs leads to
unnecessarily much file I/O (on the main thread, no less).
This change makes us defer the saving until later.
2021-03-05 21:57:34 +01:00
JosJuice
3f71c36778 Android: Move "skip scanning" logic to MainPresenter
Deduplicates code between MainActivity and TvMainActivity.
2021-03-05 21:48:23 +01:00
Léo Lam
19c5a19629
Merge pull request #9529 from JosJuice/android-broadcast-before-metadata
Android: Broadcast update before updating additional metadata
2021-03-05 00:48:04 +01:00
Léo Lam
5efd563b03
Merge pull request #9555 from JosJuice/android-jni-cleanup
Android: Some JNI cleanup
2021-03-05 00:47:36 +01:00
JosJuice
873d5f9852 Android: Broadcast update before updating additional metadata
In master, the game scanning process looks like this:

1. Scan for games
2. Scan for additional metadata (icon.png and meta.xml)
3. Save the cache if needed
4. Update the game list with the results

This change makes the game scanning process look like this:

1. Scan for games
2. Update the game list with the results
3. Scan for additional metadata (icon.png and meta.xml)
4. Update the game list with the results
5. Save the cache if needed

Updating the game list as soon as possible means the user
has to wait less before their games show up. The new behavior
matches what DolphinWX did before it was removed. (DolphinQt
has an even fancier approach where games get added one by one.)
2021-03-04 22:50:06 +01:00
JosJuice
2f0bab0192 Android: Add @Keep annotation to BooleanSupplier
I should at least follow the conventions I set myself... (See a8d385c)
2021-03-03 18:29:32 +01:00
JosJuice
4752ec8074 Android: Use SwipeRefreshLayout in MainActivity
The main reason why I'm adding this isn't actually to allow
users to swipe down to refresh, it's to add a loading indicator.
Considering that the Storage Access Framework can be slow for
folders with many items (many subfolders?), not showing a
loading indicator might give users the impression that adding
a folder resulted in nothing happening even though Dolphin is
scanning for games in the background. But I suppose letting
users swipe down to refresh is a nice bonus with the change.
2021-02-20 21:04:00 +01:00
JosJuice
cad4548b27 Android: Don't queue up multiple rescans before directory initialization 2021-02-20 21:04:00 +01:00
JosJuice
dbcdead04d Android: Split GameFileCacheService broadcasts into two types 2021-02-20 21:04:00 +01:00
JosJuice
3a8793f93f Android: Refactor MainActivity, add forEachPlatformGamesView 2021-02-20 17:55:31 +01:00
JosJuice
296efad2e3 Android: Add missing "World" entry in country list
Fixes an IndexOutOfBoundsException. (Yeah, attempts at having
cross-language enums are kinda fragile...)
2021-02-11 22:35:18 +01:00
JosJuice
606e6ca3ba Android: Adjust logic for DOL/ELF long press
Android follow-up for 83c1277. Removes some now unnecessary code
and disables "Set as Default ISO" for DOL, ELF and WAD files.
2021-02-11 22:32:20 +01:00
JosJuice
12aa1071cb Android: Re-implement a subset of CompletableFuture
Imagine if Android phones actually got updates
2021-01-27 20:10:07 +01:00
JosJuice
347551a01d Android: Implement save overwrite confirmation 2021-01-27 20:10:07 +01:00