Dont try to load temporary save states when launching netplay

An orientation change can trigger this code path immediately when a game starts. e.g. dolphin is portrait when launching the game but settings force gameplay to landscape. We want to avoid this and continue to the netplay launch code below.

If the user backgrounds dolphin during netplay and then resumes after the process has died it will actually resume from the save state in single player mode, not sure if thats good or bad but fine for now.

Netplay doesnt handle rotation very well, seems to go more and more out of sync the more rotations.
This commit is contained in:
Tom Pratt 2026-04-24 13:18:36 +02:00
parent 05cfd16665
commit ab6c2d0d56

View File

@ -208,7 +208,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
if (NativeLibrary.IsUninitialized()) {
NativeLibrary.SetIsBooting()
val emulationThread = Thread({
if (loadPreviousTemporaryState) {
// Don't load temporary saves when launching Netplay, this path can trigger
// when a game starts due to orientation changes caused by a mismatch in menu
// vs emulation activity orientations.
if (loadPreviousTemporaryState && !Netplay.isLaunching) {
Log.debug("[EmulationFragment] Starting emulation thread from previous state.")
val paths = requireNotNull(gamePaths) {
"Cannot start emulation without any game paths"