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: Remove the EmulationState class #10008

Merged
merged 5 commits into from Sep 22, 2021

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Aug 8, 2021

The purpose of this class is to keep track of state which the emulation core is also keeping track of. This is rather risky – if we update the state of one of the two without updating the other, the two become out of sync, leading to some rather confusing problems. I think we're better off only keeping this state in the emulation core.

In particular, this change fixes a panic alert deadlock when booting a file that isn't a valid GC/Wii file while holding the phone in an orientation which does not match the orientation set in the Dolphin settings.

@JosJuice JosJuice force-pushed the android-remove-emulationstate branch from 0dd90fe to 01baa7b Compare August 8, 2021 19:17
Source/Android/jni/MainAndroid.cpp Show resolved Hide resolved
Source/Android/jni/MainAndroid.cpp Outdated Show resolved Hide resolved
Source/Android/jni/MainAndroid.cpp Outdated Show resolved Hide resolved
Source/Android/jni/MainAndroid.cpp Outdated Show resolved Hide resolved
Fixes a crash which was uncovered (or just made more likely?)
by the previous commit.
These methods are only being called from the GUI thread anyway...
The purpose of this class was to keep track of state which the
emulation core was already keeping track of. This is rather risky -
if we update the state of one of the two without updating the other,
the two become out of sync, leading to some rather confusing problems.

This duplicated state was removed from EmulationState in the
previous commits, so now there isn't much left in the class.
Might as well move its members directly into EmulationFragment.
@leoetlino leoetlino merged commit 0d8ad5f into dolphin-emu:master Sep 22, 2021
10 checks passed
@JosJuice JosJuice deleted the android-remove-emulationstate branch September 22, 2021 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants