Android: Update renderer surface before resuming emulation
Previously, this could cause a race condition which resulted in the Vulkan backend attempting to acquire a swap chain image from a now non-existant surface. By ensuring the backend knows about the surface before a frame is presented, this race does not happen.
This commit is contained in:
parent
de632fc9c8
commit
0dddaf9d7d
|
@ -420,8 +420,8 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
||||||
else if (state == State.PAUSED)
|
else if (state == State.PAUSED)
|
||||||
{
|
{
|
||||||
Log.debug("[EmulationFragment] Resuming emulation.");
|
Log.debug("[EmulationFragment] Resuming emulation.");
|
||||||
NativeLibrary.UnPauseEmulation();
|
|
||||||
NativeLibrary.SurfaceChanged(mSurface);
|
NativeLibrary.SurfaceChanged(mSurface);
|
||||||
|
NativeLibrary.UnPauseEmulation();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue