-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Add Paths to UI #7920
Android: Add Paths to UI #7920
Conversation
I don't think we should have this without having the default ISO exposed in the settings, since there otherwise would be no way to clear it without editing Dolphin.ini. |
a5a696b
to
462cf6c
Compare
There's no play button on Android so is there a reason to clear the default ISO setting? Other than the play button, I think only mod launchers care about this setting and it can now be easily changed from Dolphin's UI. But we could wait on this PR until the |
@@ -64,14 +68,24 @@ public Dialog onCreateDialog(Bundle savedInstanceState) | |||
SettingsActivity.launch(getActivity(), MenuTag.WIIMOTE, gameId); | |||
break; | |||
case 4: | |||
clearGameSettings(gameId); | |||
// Set as default ISO for GC, Wii clear game settings for else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems very error prone to me... Is there no other way to tell what option was selected? Not a big fan of those unnamed indices which are essentially magic numbers that can even change depending on the game file platform (!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved my changes to earlier in the array to reduce ugliness. The cases aren't named because they change depending upon platform. I think the goal was to conditionally include Wiimote settings while keeping Clear Game Settings at the end of the array. I could separate the Game Properties .setItems
by platform but then I'd need to duplicate the switch
. There's only one case that differs between platforms so I'm thinking I should keep this as-is. Let me know if you disagree.
9695c2b
to
aa802eb
Compare
4ff54a0
to
fe8d8f0
Compare
6a4923a
to
d0c006a
Compare
I took care of @JosJuice's concerns. I expanded the scope of this PR to include the Paths submenu. See updated original description for noteworthy changes. Requesting a review! |
Slight comment clarification. Although the changes in |
I realize the few Android devs may be busy but ...anyone? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still no way to clear the Default ISO setting as far as I can tell.
The behavior of going back to the game list once you've selected OK or Cancel in the file picker feels quite weird to me. I'm assuming this is related to the TODO comments in SettingsActivity?
.../Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java
Outdated
Show resolved
Hide resolved
f2b9665
to
44129b1
Compare
I implemented clearing the default ISO as a runnable that asks the user to confirm the action (see third screenshot). This will be used in future PRs too (i.e. toggling all log types). I agree that the behavior in I've done things in Java that I haven't tried before in this PR so it should probably be given a thorough look. |
...it seems nobody has any other comments on this PR so can it be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay.
.../src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityPresenter.java
Outdated
Show resolved
Hide resolved
...ndroid/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java
Outdated
Show resolved
Hide resolved
...ndroid/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java
Outdated
Show resolved
Hide resolved
...ndroid/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java
Outdated
Show resolved
Hide resolved
I found a bug: If you first go to the paths settings and bring up the file picker for the SD card path (and press either Cancel or OK), and then go to add a game directory to the game list, the directory picker will only show .raw files instead of only game files. The logic for which set of extensions to use seems quite fragile, with CustomFilePickerFragment (which is not part of the settings code) relying on the value of a static variable in SettingsAdapter. If it's possible to do it without static variables like that, that would be preferable. |
0258f19
to
679b35e
Compare
The bug you described has been fixed by clearing the static variables in
Hopefully the latest version addresses everything. I think this is good to go and I received feedback so I'm removing my [Feedback Wanted] label. |
I have made a commit that makes CustomFilePickerFragment not rely on the static state in SettingsAdapter. If you could include it, or something similar to it, I think I would be happy with merging the PR. I've checked that it works, but I haven't lint checked it, so maybe you'll need to edit the formatting of one or two lines. |
a9ffeac
to
c25b4c5
Compare
@JosJuice I pushed one more commit to fix I would prefer to not squash these commits in case I need to partially revert them in the future. |
@JosJuice can we get this merged? I have a feeling nobody else is going to review this PR. |
Pardon my intrusion, but this PR made me wonder if it were possible to set a custom path for the complete dolphin-emu, rather than just certain chunks. |
@ds22x That's likely possible, although using variables in paths may confuse users. I don't know if I'll get around to implementing that but you can file a feature request at https://bugs.dolphin-emu.org/projects/emulator/issues so people can better see your suggestion. |
Implements https://bugs.dolphin-emu.org/issues/10781
Android: Add Set as Default ISO to UI
Android: Add Paths to UI
Very useful for loading game mods
Removed some unnecessary import statements
Renamed some things now that
FilePicker
is more versatileAdded
ConfirmRunnable
to confirm running arbitrary runnables (so they're not accidentally clicked). It will also be useful for future PRs, especially when modifying multiple settings (i.e. toggling all log types).Fixed a bug where
launchOpenFileActivity()
could select multiple files. We don't want to be able to load multiple games at once!Review requested: See the TODO added to
SettingsActivity
. Comment out thefinish()
to see the weirdness. My workaround works but it probably isn't the prettiest!