From 92808efc93e69b10cf23b349af37f824e99c971f Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 22 Jan 2018 15:31:32 +0000 Subject: [PATCH] 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. --- renderdoc/core/replay_proxy.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renderdoc/core/replay_proxy.cpp b/renderdoc/core/replay_proxy.cpp index ecf378509..469c64dc6 100644 --- a/renderdoc/core/replay_proxy.cpp +++ b/renderdoc/core/replay_proxy.cpp @@ -1860,7 +1860,7 @@ const DrawcallDescription *ReplayProxy::FindDraw(const rdcarrayGetSupportedWindowSystems()); 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);