Commit Graph

1684 Commits

Author SHA1 Message Date
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
Bonta 2d744da68c Core: Add GBA host interface 2021-07-13 16:42:49 +02:00
JosJuice 44c99f8cc1 Android: Avoid crash on early panic alert 2021-07-08 10:37:36 +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
Léo Lam 8dc87ef698
Merge pull request #9752 from JosJuice/android-unit-tests-off
Android: Disable building unit tests by default
2021-06-02 01:04:40 +02:00
Filoppi 3c7c2dfaa1 Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03: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
JosJuice 90cf0d60f8 Android: Use VectorToJStringArray in GameFileCache.cpp 2021-05-24 22:07:31 +02:00
JosJuice c1c17339ff Android: Use DeleteLocalRef more in AndroidCommon
Any local references get cleaned up when returning to the JVM,
but some of the functions in AndroidCommon return to C++ rather
than the JVM, and functions with loops risk running into the
limit of how many simultaneous local references are allowed.
2021-05-24 22:01:49 +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
Léo Lam e89ae71cec
Merge pull request #9388 from JosJuice/default-locale
Set console's default language/country/region based on computer settings
2021-04-06 12:34:58 +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
JosJuice 27ddf6382b Set console's default language/country/region based on computer settings 2021-03-27 10:05:26 +01: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 d99d72f5a6 Android: Remove #ifdef __cplusplus checks
A C compiler would very much be unable to build this code anyway.
2021-03-04 22:47:23 +01:00
JosJuice ae5f8853a4 Android: Delete more references in IDCache.cpp
It's not causing any problems in practice so far, but let's fix it
before I add even more stuff without remembering to delete references.
2021-03-03 22:58:59 +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
Shawn Hoffman 500a694ca8 msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08: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
JosJuice 5978550b2f Android: Fix in-game settings changes not getting saved
EmulationActivity has an instance of Settings. If you go to
SettingsActivity from EmulationActivity and change some settings,
the changes get saved to disk, but EmulationActivity's Settings
instance still contains the old settings in its map of all
settings (assuming the EmulationActivity was not killed by the
system to save memory). Then, once you're done playing your
game and exit EmulationActivity, EmulationActivity calls
Settings.saveSettings. This call to saveSettings first overwrites
the entire INI file with its map of all settings (which is
outdated) in order to save any legacy settings that have changed
(which they haven't, since the GUI doesn't let you change legacy
settings while a game is running). Then, it asks the new config
system to write the most up-to-date values available for non-legacy
settings, which should make all the settings be up-to-date again.
The problem here is that the new config system would skip writing
to disk if no settings changes had been made since the last time
we asked it to write to disk (i.e. since SettingsActivity exited).

NB: Calling Settings.loadSettings in EmulationActivity.onResume
is not a working solution. I assume this is because
SettingsActivity saves its settings in onStop and not onPause.
2021-01-18 15:27:16 +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
LC be74e35a0a
Merge pull request #9443 from Simonx22/update-gradle
Android: Update Gradle Plugin to 4.1.1
2021-01-16 06:55:10 -05:00
LC 1476c10a87
Merge pull request #9445 from Simonx22/update-dependencies
Android: Update dependencies to the latest version
2021-01-16 06:54:45 -05:00
Simonx22 5b98336e54 Android: Update dependencies to the latest version 2021-01-15 19:55:57 -05:00
Simonx22 8f2a2f3cda Android: Update Gradle Plugin to 4.1.1 2021-01-15 19:53:08 -05:00
Simonx22 67bc2f9f76 gradle.properties: Remove duplicate property keys 2021-01-16 01:12:31 +01: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
JosJuice 99ffee9a0a Android: Add content provider support to File::OpenFStream 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
JosJuice d8744e6db8 Add caching to Config::Info
The goal of this change is to make Config::Get(const Info<T>&)
fast so that we can use it in hot paths.
2020-12-12 13:58:50 +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 8181a7b3dd Android: Remove unnecessary ANativeWindow_release call
This is already handled by SurfaceDestroyed. In the worst case,
the extra code could even race with SurfaceDestroyed if they
are triggered at the same time, but this is highly improbable.
2020-11-09 10:38:50 +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
LC 98726400bc
Merge pull request #9230 from JosJuice/android-savesettings-onstop
Android: Call saveSettings in EmulationActivity.onStop
2020-11-09 02:15:21 -05:00
LC 418f9faa9d
Merge pull request #9228 from JosJuice/android-jclass
Android: Fix jobject/jclass warnings
2020-11-09 02:15:04 -05:00
JosJuice 6df543fbc9 Android: Catch SecurityException in ContentHandler 2020-11-08 23:05:34 +01:00
JosJuice 713d309386 Android: Call notifyItemChanged after file picker 2020-11-08 23:05:33 +01:00
JosJuice 62e6bedd25 Android: Show warning after picking file with wrong extension 2020-11-08 23:05:31 +01:00
JosJuice 73f013e3cc Android: Use storage access framework for custom SD card paths
This is part of my efforts to add support for scoped storage.
2020-11-08 17:51:59 +01:00
JosJuice e4793cfb39 Android: Don't name unused JNIEnv/jobject/jclass parameters 2020-11-07 12:08:48 +01:00
JosJuice 57dc54144d Android: Fix jobject/jclass warnings
Static methods use jclass, and non-static methods use jobject.
2020-11-07 12:06:57 +01:00
Ryan Meredith cd52da959c Android: Remove unnecessary WrongConstant warning suppression 2020-11-07 01:35:59 -05:00
JosJuice a1a4d12b62 Android: Call saveSettings in EmulationActivity.onStop
I didn't realize that onSaveInstanceState doesn't get called
when finishing the activity.
2020-11-06 22:40:29 +01:00
JosJuice 2acd3abe35
Merge pull request #9223 from Ebola16/D
Android: Suppress warnings in EmulationActivity
2020-11-06 19:57:06 +01:00
JosJuice 5afda5efe3
Merge pull request #9209 from Ebola16/AIRSDS
Android: Update IR sensitivity default values
2020-11-06 19:56:53 +01:00
JosJuice 70df5446d3 Android: Make the handling of SAF open modes more robust 2020-11-06 17:40:03 +01:00
JosJuice b6e236ef86 Android: Make scrollbar for in-game menu always visible
Some users aren't noticing that the in-game menu can be scrolled.
I hope this will help with that, though I'm not sure by how much.
2020-11-06 11:40:38 +01:00
JosJuice a348efe947 Fix dereferencing nullptr BootParameters 2020-11-06 09:34:53 +01:00
JosJuice 56122f38bb Android: Rename path variable in ConvertFragment
Not sure why I named it path, because it isn't a path.
2020-11-05 18:16:07 +01:00
Ryan Meredith 0a239cc1bd Android: Suppress warnings in EmulationActivity 2020-11-04 20:34:25 -05:00
LC d5c0a9a185
Merge pull request #9215 from JosJuice/android-pointer-portrait
Android/InputOverlayPointer: Don't assume surface covers whole screen
2020-11-02 18:05:47 -05:00
LC 4e2875eec3
Merge pull request #9217 from JosJuice/android-touch-checks
Android: Remove some touchscreen checks from EmulationActivity
2020-11-02 18:05:15 -05:00
JosJuice 8123263631 Android: Remove some touchscreen checks from EmulationActivity
It's better to directly check whether we have an InputOverlay
than to check a proxy for it.
2020-11-02 11:05:21 +01:00
JosJuice f6ef6a317d Android: Don't reset savestate time on load 2020-11-02 10:47:39 +01:00
JosJuice a66afc864f Android/InputOverlayPointer: Don't assume surface covers whole screen
This assumption is false both in portrait mode (where it only
covers the top half of the screen) and when using two apps at once.

Fixes https://bugs.dolphin-emu.org/issues/12307.
2020-11-02 10:23:57 +01:00
Ryan Meredith 9999cf05f3 Android: Update IR sensitivity default values 2020-10-29 17:58:16 -04:00
Ryan Meredith cc53249591 Android: showMotionControlsOptions cleanup 2020-10-28 06:17:11 -04:00
Ryan Meredith df4cef44fd Android: Remove unused imports 2020-10-28 02:14:30 -04:00
Ryan Meredith 721f3bef69 Android: Fix initTouchPointer 2020-10-27 05:15:17 -04:00
JosJuice 3a119e1ec7 Android: Update WiimoteNew.ini preferences instead of deleting 2020-10-24 22:45:02 +02:00
JosJuice 563d9365b5 Android: Re-add motionControlsEnabled to clearWiimoteNewIniLinkedPreferences
This was removed in cc5802b when it should have
been converted to the new setting instead,
and it seems like I didn't notice when reviewing it.

I'm changing the DirectoryInitialization logic a little
so that clearWiimoteNewIniLinkedPreferences also is called
when there was no WiimoteNew.ini previously, in case the
user deleted WiimoteNew.ini but not Dolphin.ini.
2020-10-24 13:08:29 +02:00
JosJuice ba2aeb99d6 Android: Remove hacks for Wii Remote extension setting, round 2
It's still not exactly pretty, but now all the mess
is contained in one place and has a proper interface.
Fixes https://bugs.dolphin-emu.org/issues/12218.
2020-10-22 11:37:56 +02:00
JosJuice 21d3ea523c Android: Show how long ago each savestate was created 2020-10-21 22:49:59 +02:00
Léo Lam a8b7c3b577
Merge pull request #8893 from JosJuice/android-jni-declarations
Android: Remove unnecessary JNI function declarations
2020-10-21 22:46:58 +02:00
JosJuice 3a0917371e Android: Don't show game ID after game title 2020-10-21 20:02:52 +02:00
JosJuice 0dc29c743b Android: Get game metadata from core
Trying to get it from a GameFile before emulation starts is unreliable.
2020-10-21 20:02:52 +02:00
Léo Lam 43d11ca3eb
Merge pull request #8962 from JosJuice/android-saf-wad
Android: Use storage access framework for importing WADs
2020-10-21 19:16:10 +02:00
Ryan Meredith 353a67824d Android: Add AndroidOverlayButtons INI section 2020-10-20 12:03:41 -04:00
Ryan Meredith 69adfe0218 Android: Add "Default Values" button for overlay seekbars 2020-10-20 11:59:57 -04:00
Ryan Meredith cc5802ba04 Android: Convert SharedPreferences to INI Settings (simple cases) 2020-10-20 11:58:54 -04:00
Léo Lam 2e86e1a998
Merge pull request #9146 from JosJuice/android-disable-cover-download
Android: Allow disabling cover downloading
2020-10-20 13:31:01 +02:00
Léo Lam 409230e088
Merge pull request #9061 from Ebola16/Fixes3
Android: Improve WRITE_EXTERNAL_STORAGE denial
2020-10-20 02:15:08 +02:00
Léo Lam d448bd5bdf
Merge pull request #9154 from Ebola16/RR
Android: ConfirmRunnable to RunRunnable with optional confirmation
2020-10-20 00:50:10 +02:00
JosJuice 439866d257 Android: Remove unnecessary JNI function declarations
We generally have no reason to call these functions on our own, so
there's not much reason to declare them, especially not in the cpp
file where they're defined. In case we ever do get a reason to do
it, we can add declarations for just the functions that need them.
2020-10-19 20:55:13 +02:00
JosJuice 6380c65ff8 Android: Refetch game metadata after returning from settings 2020-10-19 20:03:47 +02:00
JosJuice 5e70dda4cc Android: Allow disabling cover downloading
In case someone wants to be very careful with how much bandwidth
they use or with what data GameTDB.com collects on you.
This is already an option in DolphinQt (though in DolphinQt it
will switch entirely from using covers to banners when turned off).
2020-10-19 20:03:47 +02:00
JosJuice 195b551d87 Android: Allow reading global settings without a Settings object
This makes things more convenient for code that just
wants to read the current value of a setting.
2020-10-19 20:03:47 +02:00
JosJuice cb14b65aad CMake: Fix build errors exposed by making common dependent on fmt 2020-10-19 14:36:09 +02:00
Léo Lam a209410e70
Merge pull request #9148 from JosJuice/android-active-layer
Android: Fix setting read during play with local game layer active
2020-10-19 12:17:59 +02:00
JosJuice 8d91b4ea8c Android: Show alert messages as toasts outside of emulation
It would be difficult to use the AlertMessage class for
messages that need to be showed outside of emulation,
but showing them as toasts is better than not showing them.
2020-10-18 16:06:46 +02:00
Ryan Meredith d8c5f4323b Android: ConfirmRunnable to RunRunnable with optional confirmation 2020-10-18 07:48:35 -04:00
JosJuice 16f5a50cfc
Merge pull request #9144 from JosJuice/confirm-runnable-finish
Android: Remove finish from ConfirmRunnableViewHolder
2020-10-15 18:44:01 +02:00
Léo Lam ebeca05000
Merge pull request #9119 from JosJuice/android-seekbar-min
Android: Correct SliderSetting minimum value behavior on API < 26
2020-10-14 12:38:29 +02:00
Léo Lam b24223c178
Merge pull request #9135 from JosJuice/show-nkit
Show NKitness in file format string
2020-10-14 12:19:53 +02:00
JosJuice 2861248520 Android: Fix setting read during play with local game layer active
During emulation, when LocalGame has a value but CurrentRun
doesn't, we want to read from LocalGame, not CurrentRun. This
change exposes a LAYER_ACTIVE option that handles this correctly.
2020-10-13 16:35:33 +02:00
JosJuice 28b640fb0d Android: Remove finish from ConfirmRunnableViewHolder 2020-10-11 10:34:12 +02:00