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 authored and Baldur Karlsson committed 2018-05-24 10:45:46 +01:00
1 parent 9e3a454a18
commit d2cdca45a5
1 file changed
+3
+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
{