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: Fix issue when launching a game when Dolphin is not open #12345

Merged
merged 1 commit into from Dec 5, 2023

Conversation

minhaferzz
Copy link

What

When Dolphin is not open, attempting to launch a game from a frontend launcher will result in the user opening Dolphin and being taken back to the frontend launcher.

Why

This is caused by calling parent.finish() before AfterDirectoryInitializationRunner is complete, thus canceling the launch of the game.

How

Fixed by calling activity.finish() after AfterDirectoryInitializationRunner is initialized and complete.

@JosJuice
Copy link
Member

JosJuice commented Dec 1, 2023

Thanks for figuring out the cause of this issue.

This PR as it's currently written would have undesired behavior when launching games from Dolphin's game list. Could you make EmulationActivity.launch have a parameter that can be used to control this behavior?

@minhaferzz
Copy link
Author

Updated the PR include a check if it's being launched from an intent and will finish it if is.

@JosJuice
Copy link
Member

JosJuice commented Dec 1, 2023

If performLaunchChecks decides to do something other than running continueCallback, the parent activity no longer gets finished with your latest commit. Is that intentional?

@minhaferzz
Copy link
Author

Good catch. Moved the logic into the performLaunchChecks.

@JosJuice
Copy link
Member

JosJuice commented Dec 1, 2023

Looks good to me, but please squash your commits into one.

Add frontIntent flag to control activity.finish()

Moved parent activity finish inside of performLaunchChecks
@minhaferzz
Copy link
Author

Done

@lioncash lioncash merged commit 2199dd2 into dolphin-emu:master Dec 5, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants