Skip to content
Snippets Groups Projects
Commit b3a1f793 authored by Charles Lombardo's avatar Charles Lombardo
Browse files

android: Update surface parameters on emulation start

This adds a quick update that notifies the render surface if there was a change between surface creation and emulation starting.
parent eda40338
No related branches found
No related tags found
No related merge requests found
...@@ -312,6 +312,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { ...@@ -312,6 +312,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
ViewUtils.showView(binding.surfaceInputOverlay) ViewUtils.showView(binding.surfaceInputOverlay)
ViewUtils.hideView(binding.loadingIndicator) ViewUtils.hideView(binding.loadingIndicator)
emulationState.updateSurface()
// Setup overlay // Setup overlay
updateShowFpsOverlay() updateShowFpsOverlay()
} }
...@@ -804,6 +806,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { ...@@ -804,6 +806,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
} }
} }
@Synchronized
fun updateSurface() {
if (surface != null) {
NativeLibrary.surfaceChanged(surface)
}
}
@Synchronized @Synchronized
fun clearSurface() { fun clearSurface() {
if (surface == null) { if (surface == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment