Commit graph

808 commits

Author SHA1 Message Date
Ryan Meredith
42b2d11f8d Android: seekbar.setMin requires API level 26 2020-09-26 23:55:16 -04:00
JosJuice
bdfce1cd13 Android: Fix convertCompressionLevelZstdValues
That's what I get for copy-pasting
2020-09-26 11:25:54 +02:00
Ryan Meredith
c3f34ac3fa Android: Add "Ignore for this session" to Warning AlertMessages 2020-09-25 11:50:59 -04:00
Ryan Meredith
991eb6ae83 Android: Use DialogFragment for AlertMessage 2020-09-25 11:50:04 -04:00
JosJuice
8f712114b6 Android: Use storage access framework for importing WADs
This is part of my efforts to add support for scoped storage.
I figured I would start with a relatively simple feature to
make sure that everyone is fine with the approach I'm taking
before I tackle more complicated features like the game list.
2020-09-23 18:36:23 +02:00
JMC47
54e570a95f
Merge pull request #8902 from JosJuice/android-convert
Android: Add disc image conversion
2020-09-23 12:27:43 -04:00
JMC47
f33767f19c
Merge pull request #9088 from JosJuice/android-sysconf
Android: Add Wii SYSCONF settings to GUI
2020-09-22 14:03:56 -04:00
JMC47
6ada03fca2
Merge pull request #9075 from JosJuice/android-osd-left-margin
Android: Move OSD out of the way when menu is open
2020-09-16 16:42:04 -04:00
JMC47
097a4f4ecf
Merge pull request #9077 from JosJuice/android-settings-initialized
Android: Wait for initialization before launching EmulationActivity
2020-09-16 16:37:28 -04:00
JosJuice
5ba0832158 Android: Add workaround for conversion progress in dark mode 2020-09-16 18:48:25 +02:00
JosJuice
f01ccfdb82 Android: Only allow conversion when appropriate 2020-09-16 18:48:25 +02:00
JosJuice
23ea47d4df Android: Refactor GamePropertiesDialog.onCreateDialog 2020-09-16 18:48:25 +02:00
JosJuice
5d13f3675f Android: Pass GameFile to GamePropertiesDialog::newInstance 2020-09-16 18:48:20 +02:00
JosJuice
8c999cf3b1 Android: Let the user select where to save disc images 2020-09-16 18:38:53 +02:00
JosJuice
3805b84906 Android: Add content provider support to File::Delete 2020-09-16 18:38:53 +02:00
JosJuice
6e1e6d2311 Android: Add content provider support to File::IOFile
Taking the hit now to prepare us for when Google Play will
force us to use scoped storage...
2020-09-16 18:38:53 +02:00
JosJuice
d9f3e382fe Android: Add a progress dialog for disc image conversion 2020-09-16 18:38:52 +02:00
JosJuice
7d6debb907 Android: Add disc image conversion 2020-09-16 18:38:07 +02:00
JosJuice
161f99b864 Android: Move OSD out of the way when menu is open
https://bugs.dolphin-emu.org/issues/12256
2020-09-16 18:36:15 +02:00
JosJuice
6e6446be83 Android: Add Wii SYSCONF settings to GUI
Now that PR 8975 is merged, we can finally add this without hacks.

https://bugs.dolphin-emu.org/issues/11605
2020-09-16 12:49:55 +02:00
JosJuice
fb2e633e1e Android: Don't assume SliderSetting minimum is 0 2020-09-16 11:59:38 +02:00
JosJuice
a7b9e6857b
Merge pull request #8975 from JosJuice/android-new-config
Android: Hook up the new config system
2020-09-16 09:49:16 +02:00
JosJuice
744c0b13cf Android: Display default path when no path is set 2020-09-15 19:10:57 +02:00
JosJuice
9c19309a03 Android: Allow editing settings during emulation 2020-09-15 19:10:56 +02:00
JosJuice
736505f020 Android: Show overridden game settings in bold 2020-09-15 19:10:56 +02:00
JosJuice
e24d50e881 Android: Hook up game settings to the new config system 2020-09-15 19:10:56 +02:00
JosJuice
a538301891 Android: Hook up global settings to the new config system 2020-09-15 19:10:55 +02:00
JosJuice
c8a76e6928 Android: Fix touch pointer not working after activity recreation
The only place where initTouchPointer was called automatically
was Host_RequestRenderWindowSize, which is called at least once
after emulation start, but not after activity recreation.
2020-09-14 14:13:29 +02:00
Ryan Meredith
d643723d3a Android: Improve WRITE_EXTERNAL_STORAGE denial 2020-09-13 10:08:04 -04:00
JosJuice
8bd704304e Android: Check for granted permission when returning to MainActivity 2020-09-13 14:25:14 +02:00
JosJuice
f011e859b4 Android: Centralize default values for settings
I was hoping we would be able to pull in the default values
from C++, but it seems like more trouble than it's worth,
partially because of different settings having default values
of different types and partially because we don't have any
convenient way to get a list of all C++ settings.
2020-09-12 14:59:34 +02:00
JosJuice
13d1ef6681 Android: Centralize setting definitions
Except controller settings, because those would be annoying
to fit into the same system, and I only need the non-controller
settings to be brought over for the next commits to work.
2020-09-12 14:29:34 +02:00
JosJuice
d51f58f828 Android: Wait for initialization before launching EmulationActivity
...instead of waiting for it after launching EmulationActivity.
We need this because there is code that runs very early in
EmulationActivity that accesses the settings.
2020-09-12 14:25:19 +02:00
JosJuice
cecec756ec Android: Always show Exit Emulation at bottom of menu
To make it easier to access on touchscreens.
2020-09-08 16:39:34 +02:00
JosJuice
6b68b76aed Android: Remove redundant pause/unpause code 2020-09-08 16:39:34 +02:00
JosJuice
1fdabc7481 Android: Exit emulation by long pressing Back 2020-09-08 16:39:34 +02:00
JosJuice
a03f40ab15 Android: Change "Exit" to "Exit Emulation" 2020-09-08 16:39:34 +02:00
JosJuice
29bb51c456 Android: Adjust margins for game title in menu 2020-09-08 16:39:34 +02:00
JosJuice
7aa9222dac Android: Hide Refresh Wii Remotes menu entry for GameCube games 2020-09-08 16:39:34 +02:00
JosJuice
36a3b54c1f Android: Port over settings from the old menu 2020-09-08 16:39:34 +02:00
JosJuice
364b9702f4 Android: Use narrow layout for savestate slot picker in portrait 2020-09-08 16:35:26 +02:00
JosJuice
772a98e853 Android: Ensure menu is always wide enough
25% of the screen isn't necessarily wide enough on phones,
especially not in portrait mode.
2020-09-08 16:35:26 +02:00
JosJuice
48de1333df Android: Close the menu when tapping outside of it 2020-09-08 16:35:26 +02:00
JosJuice
48c34bba8a Android: Don't hide the menu when pressing Exit
Removing the menu for a split second before showing the transition
back to the main activity looks janky.
2020-09-08 16:27:09 +02:00
JosJuice
27554d2f26 Android: Remove inappropriate leanback checks
Android TV devices aren't the only devices without touchscreens.

Regarding MotionAlertDialog, I could've replaced the leanback
check with a touchscreen check instead of just removing it,
but I thought there was no reason to prevent people with
touchscreens from doing a long back press if they want to.
2020-09-08 16:27:09 +02:00
JosJuice
cf51642c17 Android: Use Back to open the emulation menu on all devices
https://bugs.dolphin-emu.org/issues/12029

We currently have one way of opening the menu on touch screen
devices (swiping down from the top of the screen to bring up the
action bar and selecting the menu in the action bar), and another
way of opening the menu on Android TV (pressing Back). However,
some devices that claim to support touch (or don't support
leanback? Dolphin currently conflates the two) don't actually let
you swipe down from the top of the screen in the way that Dolphin
expects, notably Chromebooks. There are also some phones where you
can swipe down from the top of the screen but this for some reason
doesn't lead to the action bar becoming visible, though we are
getting less reports about this nowadays than in the past.

This change makes us use the Back method on all devices,
since it should work on all devices with no significant drawbacks.

Unfortunately, we not only have two different ways of triggering
the menu but actually two entirely different menus, with the
non-touch menu not implementing options that only are revelant
when using a touch screen. A later commit will add the missing
features to the menu that we now use on all devices.
2020-09-08 16:27:09 +02:00
LC
67761c7d31
Merge pull request #9067 from Ebola16/Fixes4
Android: Optimize imports
2020-09-08 09:47:59 -04:00
Ryan Meredith
1aacb575de Android: Remove calling create immediately before show 2020-09-08 06:20:19 -04:00
Ryan Meredith
10e85ff40c Android: Remove unnecessary getString calls 2020-09-08 06:14:58 -04:00
Ryan Meredith
255e8ff007 Android: Optimize imports 2020-09-08 06:01:34 -04:00
LC
a3dfb228fd
Merge pull request #9062 from JosJuice/android-dir-init-fail-message
Android: Optional AfterDirectoryInitializationRunner failure message
2020-09-07 22:33:52 -04:00
LC
95376208a1
Merge pull request #9064 from JosJuice/android-filepicker-normal
Android: Make FilePicker act like a normal setting
2020-09-07 22:33:10 -04:00
JMC47
344fdabf23
Merge pull request #8943 from JosJuice/android-horizontal-wiimote-buttons
Android: Fix saving Horizonal Wii Remote overlay A/B/1/2 positions
2020-09-06 17:09:51 -04:00
JosJuice
00a8f4faaa Android: Make FilePicker act like a normal setting
The reason why the finish() call was added no longer exists.
(Also, there was never a duplicate SettingsActivity as far as
I can tell, only a duplicate SettingsFragment.)
2020-09-06 14:41:01 +02:00
JosJuice
ee9444a8f9 Android: Create separate InvertedCheckBoxSetting and PercentSliderSetting classes
This way we don't have to hardcode any keys inside the classes.
2020-09-06 13:29:57 +02:00
JosJuice
c6a308380c Android: Replace Java INI parser with C++ INI parser
Fixes https://bugs.dolphin-emu.org/issues/12096.
2020-09-06 13:29:56 +02:00
JosJuice
74f197caed Android: Expose a proper interface for C++ IniFile class
Replaces the inflexible INI functions in NativeLibrary.
2020-09-06 13:29:52 +02:00
JosJuice
2959e76f4a Android: Optional AfterDirectoryInitializationRunner failure message
This centralizes the code for showing the write_permission_needed
and external_storage_not_mounted toasts.
2020-09-06 00:47:36 +02:00
LC
fb32f1ab88
Merge pull request #9042 from Ebola16/FP
Android: Minor cleanup
2020-09-01 07:27:07 -04:00
LC
d17c407f09
Merge pull request #9052 from Ebola16/GCAT
Android: Better GCAdapter scanning thread management
2020-09-01 07:25:59 -04:00
Ryan Meredith
05f3c4d579 Android: Remove unused files 2020-08-31 11:42:27 -04:00
Ryan Meredith
85ddb8fc86 Android: Minor cleanup 2 2020-08-31 11:23:59 -04:00
Ryan Meredith
30ea98177a Android: Minor cleanup 2020-08-31 07:20:02 -04:00
Ryan Meredith
7d39ed9bcc Android: res cleanup 2020-08-31 06:49:10 -04:00
Ryan Meredith
9fe6466c79 Android: Better GCAdapter scanning thread management 2020-08-27 07:43:20 -04:00
Ryan Meredith
d5ea4b4b80 Android: Prevent getSetting ClassCastExceptions in ItemViews 2020-08-21 11:09:24 -04:00
LC
905df6756b
Merge pull request #9024 from JosJuice/android-wiimote-false
Android: Fix defaults for WiimoteContinuousScanning/EnableSpeaker
2020-08-17 15:25:23 -04:00
JosJuice
ac17e49243 Android: Take RTL layout into account for menu animations 2020-08-17 19:37:40 +02:00
JosJuice
bd9d0964cd Android: Fix defaults for WiimoteContinuousScanning/EnableSpeaker
The default values need to match the default values defined in C++.
2020-08-11 09:18:15 +02:00
JosJuice
02fe1cdec4 Android: Rewrite GetRenderSurfaceScale in Java
Long sequences of JNI calls are both hard to read and slow.
2020-08-09 21:07:22 +02:00
LC
5ec65a20d6
Merge pull request #9009 from JosJuice/android-settings-recreation
Android: Fix SettingsActivity lifecycle management
2020-08-06 19:46:16 -04:00
LC
d8c0344ee8
Merge pull request #9010 from JosJuice/android-settingsadapter-redundant-static
Android: Remove some static variables from SettingsAdapter
2020-08-06 19:45:54 -04:00
JosJuice
05e49b13ef Android: Fix SettingsActivity back stack behavior after stop+start
Fixes the behavior where the settings activity would go back to
the top-level menu after switching to a different app and back.
2020-08-05 21:21:45 +02:00
JosJuice
a427eafa7b Android: Persist Settings using ViewModel
Just for maintainability. This is a shorter and more standard
solution compared to our current one where the Fragment
persists the Settings and passes it to the Activity.
2020-08-05 19:50:11 +02:00
JosJuice
e3911736c2 Android: Remove some static variables from SettingsAdapter
All of these have non-static equivalents (mView and mClickedItem).
2020-08-05 18:47:17 +02:00
JosJuice
c727f03590 Android: Properly restore state of SettingsActivityPresenter
Fixes https://bugs.dolphin-emu.org/issues/10815
2020-08-05 13:21:07 +02:00
JosJuice
7414020563
Merge pull request #8966 from Ebola16/WP
Android: Clear game profiles and GameSettings
2020-08-02 22:06:16 +02:00
JosJuice
e33876fbe2
Merge pull request #8978 from Ebola16/RS
Android: Settings and Emulation activities skip (Tv)MainActivity library rescan
2020-08-02 22:05:38 +02:00
JosJuice
234eaa0ff9
Merge pull request #7252 from Ebola16/Log
Android: Add Log Configuration to UI
2020-08-02 22:00:48 +02:00
JosJuice
bf3d1fa2d8
Merge pull request #8858 from Ebola16/PUP
Android: Add Pause / Unpause Emulation Toggle
2020-08-02 21:56:25 +02:00
Ryan Meredith
12d277b4a0 Android: Add Pause / Unpause Emulation Toggle 2020-07-29 13:03:52 -04:00
JosJuice
709031bb1d Android: Remove touchscreen check for rumble
That a device doesn't have a touchscreen doesn't necessarily mean
that it doesn't support rumble (though it is usually the case).
setPhoneVibrator already contains a check for whether the device
supports rumble, so we can simply remove the touchscreen check.
2020-07-29 17:48:56 +02:00
JosJuice
9c44ad11e3 Android: Set preferMinimalPostProcessing="true"
When using the combination of Android 11 and HDMI 2.1,
this will send a signal to the TV suggesting it to switch to
a low latency mode ("game mode").
2020-07-28 22:21:57 +02:00
Ryan Meredith
fdcc6a436b Android: Add Log Configuration to UI 2020-07-24 13:59:13 -04:00
Ryan Meredith
e7d53224b2 Android: Clear game profiles and GameSettings 2020-07-24 13:36:38 -04:00
Ryan Meredith
a0ab90f4c6 Android: Settings and Emulation activities skip (Tv)MainActivity library rescan 2020-07-24 04:04:31 -04:00
JosJuice
e9cc89af83 Android: Remove hacks for Wii Remote extension and video backend settings 2020-07-20 15:25:53 +02:00
LC
b6ee3228be
Merge pull request #8953 from JosJuice/android-target-sdk-29
Android: Increase targetSdkVersion to 29
2020-07-14 12:51:44 -04:00
JosJuice
05da2e30ad Android: Use system cache directory as cache directory
This lets Android automatically delete data in the cache
directory when the device is running low on space or
when Dolphin is uninstalled.
2020-07-12 13:33:07 +02:00
JosJuice
95945a000e Android: Increase targetSdkVersion to 29
Since updating to 28 took us so long that Google Play started
requiring updates to target 28 before we actually merged the PR that
made us target 28, I'm trying to get the update to 29 done early.

Setting targetSdkVersion to 28 would normally force scoped storage
on us, which we do not support yet. However, we can easily
avoid this by setting android:requestLegacyExternalStorage="true".
There will be no such luxury with targetSdkVersion 30, however...
2020-07-12 12:02:37 +02:00
JosJuice
a23e14fe76 Android: Fix saving Horizonal Wii Remote overlay A/B/1/2 positions
saveControlPosition was not applying the _H part of the key.
2020-07-08 15:51:11 +02:00
LC
87287181dd
Merge pull request #8907 from JosJuice/android-overlay-stick-gate
Android: Use octagonal stick gate in overlay
2020-07-08 08:50:47 -04:00
LC
a5166be995
Merge pull request #8896 from JosJuice/android-game-details-scroll
Android: Wrap game details dialog in ScrollView
2020-07-08 08:48:42 -04:00
LC
5a696f4934
Merge pull request #8906 from JosJuice/android-button-id-typo
Android: Fix button ID typo
2020-07-08 08:47:33 -04:00
Ryan Meredith
9438b3cab2 Android: Update "Speed Limit" for "Unlimited" value 2020-07-04 03:26:44 -04:00
JosJuice
f8e0ececb9 Android: Don't use square stick calibration
This essentially reverts d9c78d5. Thanks to the previous commit,
the touch controls issue which was fixed by d9c78d5 is still fixed.
The behavior for gamepads is reverted, bringing back the ability
to run diagonally in games that had trouble with it after d9c78d5.
2020-06-29 01:20:02 +02:00
JosJuice
db75509ec5 Android: Enfore correct stick gate in overlay
Currently, the touch controller overlay uses a square gate for
sticks. This commit changes that so that it instead uses the
stick gate configured in the INI, which ensures that the values
sent to the core are appropriately scaled regardless of what
is configured in the INI and makes the overlay look nicer
if the INI is set to a stick gate that matches the graphics.
2020-06-29 01:20:02 +02:00
JosJuice
e044db6da6 Android: Fix button ID typo
Probably didn't actually break anything in practice due to
how the code for sticks works, but still.
2020-06-28 22:12:35 +02:00
JosJuice
2a3aa7a1f6 Android: Wrap game details dialog in ScrollView
This makes the dialog scrollable if the contents don't fit on the
screen. This happens for me in landscape but not in portrait.
2020-06-25 12:23:56 +02:00
Tilka
26ed3b318c
Merge pull request #8891 from JosJuice/file-details
Show file format details in game properties
2020-06-25 11:00:49 +01:00