Fix bad alloc error when creating window surface

The screen doesn't refresh when changing between captures during replay on remote Android device because it fails to display the splash screen and the new preview window.
This commit is contained in:
tabi.katalin
2018-05-24 09:29:02 +02:00
committed by Baldur Karlsson
parent 9e3a454a18
commit d2cdca45a5
+3
View File
@@ -131,6 +131,8 @@ void DisplayGenericSplash()
eglBindAPI(EGL_OPENGL_ES_API);
EGLDisplay eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
eglTerminate(eglDisplay);
ANativeWindow *previewWindow = android_state->window;
if(eglDisplay && previewWindow)
@@ -286,6 +288,7 @@ void main()
eglMakeCurrent(eglDisplay, 0L, 0L, NULL);
eglDestroyContext(eglDisplay, ctx);
eglDestroySurface(eglDisplay, surface);
eglTerminate(eglDisplay);
}
else
{