mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 19:32:40 -06:00
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.
This commit is contained in:
parent
eda403388a
commit
b3a1f793c3
1 changed files with 9 additions and 0 deletions
|
@ -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 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Synchronized
|
||||||
|
fun updateSurface() {
|
||||||
|
if (surface != null) {
|
||||||
|
NativeLibrary.surfaceChanged(surface)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
fun clearSurface() {
|
fun clearSurface() {
|
||||||
if (surface == null) {
|
if (surface == null) {
|
||||||
|
|
Loading…
Reference in a new issue