Always 'release' the preview window even if it wasn't created.

* This helps on android where we might fail to create the preview window
  if our app isn't in the front, but we still want to let the base loop
  know that we're done previewing and let it go back to the generic
  splash screen.
This commit is contained in:
baldurk
2018-02-02 17:42:57 +00:00
parent 3b94095201
commit 13dd17d6f2
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -1891,9 +1891,11 @@ void ReplayProxy::ShutdownPreviewWindow()
if(m_Replay && m_PreviewOutput)
{
m_Replay->DestroyOutputWindow(m_PreviewOutput);
m_PreviewWindow(false, {});
m_PreviewOutput = 0;
}
if(m_PreviewWindow)
m_PreviewWindow(false, {});
}
void ReplayProxy::RefreshPreviewWindow()
+1 -1
View File
@@ -132,7 +132,7 @@ void DisplayGenericSplash()
EGLDisplay eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
ANativeWindow *previewWindow = android_state->window;
if(eglDisplay)
if(eglDisplay && previewWindow)
{
int major = 0, minor = 0;
eglInitialize(eglDisplay, &major, &minor);