If the preview window becomes available later, then init it later

* E.g. on android this can happen if we started the replay while the
  replay apk wasn't in the foreground, but then it gets raised later.
This commit is contained in:
baldurk
2018-01-22 20:04:17 +00:00
parent 4ee17543de
commit 92808efc93
+4 -1
View File
@@ -1860,7 +1860,7 @@ const DrawcallDescription *ReplayProxy::FindDraw(const rdcarray<DrawcallDescript
void ReplayProxy::InitPreviewWindow()
{
if(m_Replay && m_PreviewWindow)
if(m_Replay && m_PreviewWindow && m_PreviewOutput == 0)
{
WindowingData data = m_PreviewWindow(true, m_Replay->GetSupportedWindowSystems());
if(data.system != WindowingSystem::Unknown)
@@ -1876,11 +1876,14 @@ void ReplayProxy::ShutdownPreviewWindow()
{
m_Replay->DestroyOutputWindow(m_PreviewOutput);
m_PreviewWindow(false, {});
m_PreviewOutput = 0;
}
}
void ReplayProxy::RefreshPreviewWindow()
{
InitPreviewWindow();
if(m_Replay && m_PreviewOutput)
{
m_Replay->BindOutputWindow(m_PreviewOutput, false);