|
|
|
@ -1511,7 +1511,9 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { |
|
|
|
|
|
|
|
emulationState.newSurface(holder.surface) |
|
|
|
} else { |
|
|
|
emulationState.newSurface(holder.surface) |
|
|
|
// Surface changed due to rotation/config change |
|
|
|
// Only update surface reference, don't trigger state changes |
|
|
|
emulationState.updateSurfaceReference(holder.surface) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1842,6 +1844,14 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Synchronized |
|
|
|
fun updateSurfaceReference(surface: Surface?) { |
|
|
|
this.surface = surface |
|
|
|
if (this.surface != null && state == State.RUNNING) { |
|
|
|
NativeLibrary.surfaceChanged(this.surface) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Synchronized |
|
|
|
fun clearSurface() { |
|
|
|
if (surface == null) { |
|
|
|
|