Commit graph

885 commits

Author SHA1 Message Date
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
JosJuice
cd4ccda51c Android: Add "Import Wii Save" 2021-01-27 20:10:06 +01:00
JosJuice
b08306d0b8 Android: Refactor MainPresenter.installWad
Also replacing a toast with a dialog so that you have proper
time to read the message.
2021-01-27 20:10:06 +01:00
JosJuice
4a394ffc9c Android: Merge launchInstallWad into launchOpenFileActivity 2021-01-27 20:10:05 +01:00
JosJuice
80b56b6575 Android: Move InstallWAD to a new WiiUtils class
I'm trying to move away from dumping every native method
in NativeLibrary.
2021-01-27 20:10:05 +01:00
Léo Lam
b597b16f63
Merge pull request #9439 from Darwin-Rist/master
Added Opacity settings for touchscreen controls
2021-01-27 19:35:58 +01:00
Bankaimaster999
d1c3d4f419 Added Opacity settings for touchscreen controls
Added Opacity controls for the user to customize the opacity of their touchscreen controls. Also, placed both Scale and Opacity settings into one window/option called Adjust Controls.
2021-01-17 17:25:00 +01:00
Simonx22
5b98336e54 Android: Update dependencies to the latest version 2021-01-15 19:55:57 -05:00
JosJuice
116a5a79da Android: Use old folder picker on Android TV
See the comment I added to the code. This is a rather serious
issue for Android TV users from what I've heard.
2021-01-08 16:27:33 +01:00
JosJuice
c1d041b888
Merge pull request #9318 from JosJuice/android-saf-games
Android: Use storage access framework for game list
2020-12-30 11:10:35 +01:00
JosJuice
d78277c063 Android: Add specialized content provider implementation of DoFileSearch 2020-12-28 21:00:10 +01:00
JosJuice
01b964b01a Android: Don't consider .dff files valid for game list 2020-12-28 18:53:20 +01:00
JosJuice
73855168f3 Android: Show a message when adding a folder with no games
To catch people who try to use unsupported formats.
2020-12-28 18:53:18 +01:00
JosJuice
7cf62fed59 Android: Only have one settings entrypoint in game properties
In 8c723d0, I intended to update the main activity, emulation
activity and game properties dialog, but I forgot to actually
update the game properties dialog. This commit fixes that.

The changes outside of GamePropertiesDialog.java are just
to hide the Wii controller settings for GameCube games.
2020-12-27 13:05:26 +01:00
LC
d61c64684b
Merge pull request #9357 from JosJuice/android-one-settings-entrypoint
Android: Only have one settings entrypoint per activity/dialog
2020-12-24 12:46:43 -05:00
JosJuice
8c723d0584 Android: Only have one settings entrypoint per activity/dialog
Basically, instead of having one button for config, one button
for graphics settings and so on, we now have just one settings
button which takes you to a screen where you pick between
config/graphics/GameCube controllers/Wii Remotes.

The main reason I want to do this is because people still have
trouble finding Overlay Controls in the "new" in-game menu.
Typically (depending on the screen size and the length of the
game name), the scrollable part of the menu can fit 4 items,
and merging Config and Graphics Settings into one item would
move Overlay Controls from 5th place to 4th place (assuming the
user doesn't have savestates enabled), which makes it findable
even for users who don't realize the menu can be scrolled.

The dialog that's shown when long pressing a game in the game
list is also shortened. While not a pressing matter, I think
it was getting a bit long.

An additional reason to do this is because we probably will
want to make it possible to edit the controller settings
from the in-game menu at some point in the future. With the
old approach, this would require us to dedicate a whopping 4
menu items just for settings (not including Overlay Controls),
which I think is excessive.
2020-12-24 16:48:20 +01:00
JosJuice
6f05c40013 Android: Correctly save in-game settings changes to disk 2020-12-24 13:37:33 +01:00
JosJuice
399ede37a6 Android: Catch all exceptions in ContentHandler 2020-12-20 13:24:54 +01:00
JosJuice
ae8de35105 Android: Use storage access framework for game list 2020-12-20 13:24:54 +01:00
JosJuice
2126f62111 Android: Add content provider support to File::ScanDirectoryTree 2020-12-20 13:24:54 +01:00
JosJuice
525268f043 Android: Fix opening games with extensionless URI 2020-12-20 13:24:54 +01:00
JosJuice
e60665da94 Android: Use storage access framework for picking single games 2020-12-20 13:24:54 +01:00
JosJuice
a7c05d7e84 Android: Add content provider support to File::FileInfo 2020-12-20 13:24:54 +01:00