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 Pause / Unpause Emulation Toggle #8858
Conversation
|
Reminder to update |
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.
LGTM, tested on ASUS RoG Phone II. I don't have an Android TV so I didn't test the leanback part. Otherwise, the pause/play buttons work even after resuming the dolphin app or rotating the screen.
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java
Show resolved
Hide resolved
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java
Outdated
Show resolved
Hide resolved
47880dc
to
6e6378d
Compare
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.
Code LGTM.
|
Something went wrong while testing. Looking into it now. |
|
@JosJuice passing |
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 did a little hacking to make my phone run the code paths intended for Android TV, and the code did not work. mPauseEmulationTv and mUnpauseEmulationTv get set to null in onCreateOptionsMenu, so you get a NullPointerException when you try to pause.
I don't believe any MenuFragment has been created at the point onCreateOptionsMenu runs. Perhaps it would be better to put the findViewById calls in MenuFragment.onCreateView. Or maybe you could use the approach I suggested earlier, but only for the Android TV menu.
You can use my branch at https://github.com/JosJuice/dolphin/tree/android-menu-back if you want to test in the way I tested. Make sure to edit the TvUtil.isLeanback checks added in your code.
|
@JosJuice Thanks! That helped and I think I got it working on Android TV but I still can't truly test it since I can't initialize OGL on the Android Emulator. Another check would be appreciated. Marking this as working on Android TV. |
Implements https://bugs.dolphin-emu.org/issues/10602 and should survive orientation changes.
fragment_ingame_menu.xmlchanges for Android TV work.