Commit graph

1060 commits

Author SHA1 Message Date
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
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
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
Ryan Meredith
64afe97491 Android: Convert ISOPaths to INI settings 2020-12-20 13:24:54 +01:00
JMC47
75899b0e11
Merge pull request #9221 from JosJuice/android-saf-sd-card
Android: Use storage access framework for custom SD card paths
2020-12-10 16:32:43 -05:00
Ryan Meredith
bd02caba4b Android: Expand WiimoteProfileSetting to more setting types 2020-12-10 11:55:24 -05:00
JosJuice
c9e83867a1
Merge pull request #9089 from JosJuice/android-orientation-setting
Android: Move orientation setting to main settings screen
2020-12-10 16:17:44 +01:00
Ryan Meredith
aaafb9ba04 Android: Add "Generate a New Statistics Identity" 2020-11-30 13:20:58 -05:00
LC
ea2ec64ab4
Merge pull request #9298 from Ebola16/AClearLog
Android: Clear Log file
2020-11-30 09:34:57 -05:00
Ryan Meredith
777da89830 Android: Add "Disable Fastmem" debug setting 2020-11-29 17:41:10 -05:00
Ryan Meredith
f18cd9e288 Android: Clear Log file 2020-11-29 02:37:22 -05:00
Sepalani
20ebed51bb IP/Top: Add Android network interface 2020-11-27 19:10:28 +04:00
JosJuice
115dedec63 Android: Fix default values for GC/Wii controller 1 2020-11-20 22:17:00 +01:00
JosJuice
0dcb6794d3 Android: Remove "Reset Paths to Default Settings"
There is now a more general way of resetting settings,
so we don't need this.
2020-11-20 22:17:00 +01:00
JosJuice
064cde9774 Android: Long press a setting to reset it
This is particularly important for game INIs, where a setting being
unset is not the same as it being set to the default value.
2020-11-20 22:17:00 +01:00
JosJuice
730f9cb7bd Android: Fix IllegalStateException on startup
See https://github.com/dolphin-emu/dolphin/pull/9095#pullrequestreview-535576465
2020-11-20 18:33:00 +01:00
Léo Lam
858d7612ef
Merge pull request #9170 from JosJuice/android-extension-hack-2
Android: Remove hacks for Wii Remote extension setting, round 2
2020-11-20 02:47:23 +01:00
Léo Lam
30bffca5c3
Merge pull request #9193 from JosJuice/android-clear-motioncontrolsenabled
Android: Re-add motionControlsEnabled to clearWiimoteNewIniLinkedPreferences
2020-11-20 02:37:51 +01:00
JosJuice
a8d385c705 Android: Add @Keep annotation to things accessed using JNI
This acts as a hint to both people and automated tools
that a variable or method shouldn't be renamed or removed.
2020-11-17 14:11:51 +01:00
JosJuice
161f8c3fad Android: Warn when path in config is unavailable
Content URIs stop working if Dolphin loses permissions,
which happens for instance when reinstalling Dolphin.
2020-11-11 18:56:15 +01:00
JosJuice
32ad2dcec3 Android: Add null check for InputOverlay
Hopefully fixes https://bugs.dolphin-emu.org/issues/12316.
2020-11-11 10:38:49 +01:00
JosJuice
e260f9815c Android: Move orientation setting to main settings screen
I moved it from the main settings screen to the in-game menu
in PR 8439 so that it could be changed while a game is running,
but now that the main settings can be accessed while a game is
running, there's no reason to not put it in the main settings.

https://bugs.dolphin-emu.org/issues/12067
2020-11-09 21:41:00 +01:00
JosJuice
d982afd1ef Android: Fix alert messages when EmulationActivity is being destroyed
The previous commit made this easy to reproduce when launching
an invalid disc image with the phone rotated incorrectly.
2020-11-09 10:38:50 +01:00
JosJuice
ee52f465b1 Android: Fix rotating EmulationActivity after boot fails
Time for yet another new iteration of working around the
"surface destruction during boot" problem...
This time, the strategy is to use a mutex in MainAndroid.cpp.
2020-11-09 10:38:49 +01:00
JosJuice
d06830b274 Android: Only show emulation menu toast if boot succeeds 2020-11-09 10:33:53 +01:00
JosJuice
0280f3557c Android: Finish EmulationActivity from C++
This makes EmulationActivity automatically close if booting
fails, and lets us get rid of s_emulation_end_event.
2020-11-09 10:33:52 +01:00
LC
a9ef7e0e43
Merge pull request #9225 from JosJuice/android-convertfragment-path
Android: Rename path variable in ConvertFragment
2020-11-09 02:16:59 -05:00
LC
db83c7ec8d
Merge pull request #9227 from JosJuice/android-menu-scrollbar
Android: Make scrollbar for in-game menu always visible
2020-11-09 02:16:34 -05:00