Skip to content
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 online system update functionality #10369

Merged
merged 7 commits into from
Jan 22, 2022

Conversation

Simonx22
Copy link
Member

@Simonx22 Simonx22 commented Jan 13, 2022

This PR adds the online system update functionality to the Android version of Dolphin.
Thanks to @OatmealDome for helping me to debug my issues and help me out on the C++ part.

  • The update process is very similar to the desktop version of Dolphin.
  • Two new buttons have been added to the main view's menu: launch Wii Menu and Perform Online System Update
  • New buttons have been added to Android TV as well.
  • Logic has been to handle cases like launching the Wii Menu if it has not been installed.

There are two remaining issues:

  1. The update fails if the screen is being rotated during the update. We mitigated this issue by locking the device orientation to the current position with setRequestedOrientation. The rotation will be unlocked after the update is done. A log file for this problem can be found here: https://gist.github.com/Simonx22/9dc0f0bd7650d600fbd62f273b4f5d2a
  2. The update fails almost immediately on the official x64 Android Emulator. It works fine with the arm64 Emulator. A log file for this problem can be found here: https://gist.github.com/Simonx22/d3380f9efeb978a5f1dd2c7f3d07a88a

Screenshots:

Source/Android/jni/AndroidCommon/IDCache.cpp Show resolved Hide resolved
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState)
{
// Rotating the device while the update is running can result in a title failing to import.
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LOCKED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels rather ugly in general. Is there really no better solution? (Not that I can think of what the better solution would be myself...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the mitigation is the best thing I could come up with, I'm not sure why the update is stopping on rotation. :/

Source/Android/app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
Source/Android/app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
@Simonx22 Simonx22 force-pushed the android-online-system-update-2 branch 4 times, most recently from c62cd20 to b70d34d Compare January 15, 2022 00:09
@mbc07
Copy link
Contributor

mbc07 commented Jan 15, 2022

So, what's up with FifoCI randomly triggering on PRs that don't touch any rendering related code lately?

@Simonx22 Simonx22 force-pushed the android-online-system-update-2 branch from b70d34d to 676527e Compare January 15, 2022 00:10
@OatmealDome
Copy link
Member

@mbc07 I introduced a new FifoCI worker running on the M1 Mac because I thought it would be useful, but it appears to render odd one pixel differences every run. We're not sure why.

Copy link
Member

@JosJuice JosJuice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the progress briefly says "NaN %" at the beginning of the update. Though I'm not sure which piece of code is responsible...

@Simonx22 Simonx22 force-pushed the android-online-system-update-2 branch from 2360345 to 6ba55b8 Compare January 21, 2022 21:52
@OatmealDome OatmealDome force-pushed the android-online-system-update-2 branch 2 times, most recently from d37ca36 to 8c81ef8 Compare January 21, 2022 22:21
@Simonx22
Copy link
Member Author

I've addressed all comments. The progress bar is also no longer saying "NaN %" now.

@JMC47 JMC47 merged commit 237947e into dolphin-emu:master Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants