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: Handle failed boots correctly #9229

Merged

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Nov 6, 2020

If you try to boot an invalid file in master (for instance if you pick Open File and try to open a PNG file you renamed to .iso), Dolphin more or less locks up. This PR aims to make that scenario work correctly.

@JosJuice JosJuice force-pushed the android-emulationactivity-finish branch from 5672d5b to 1a1df9b Compare November 6, 2020 21:35
Copy link
Member

@Ebola16 Ebola16 left a comment

Choose a reason for hiding this comment

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

I'm not certain about all of the implications of the C++ changes but everything here makes sense. These surface destruction problems are annoying!

@lioncash
Copy link
Member

lioncash commented Nov 9, 2020

Feel free to merge once the conflict is resolved.

This makes EmulationActivity automatically close if booting
fails, and lets us get rid of s_emulation_end_event.
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.
The previous commit made this easy to reproduce when launching
an invalid disc image with the phone rotated incorrectly.
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.
@JosJuice JosJuice force-pushed the android-emulationactivity-finish branch from 4cd00e7 to 8181a7b Compare November 9, 2020 09:39
@JosJuice JosJuice merged commit 72997c1 into dolphin-emu:master Nov 9, 2020
10 checks passed
@JosJuice JosJuice deleted the android-emulationactivity-finish branch November 9, 2020 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants