From 4eda46fd96bb865c766ecfd502e76303bebe3e88 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 18 May 2017 15:57:52 +0100 Subject: [PATCH] Don't print to stdout/stderr in captured programs * Otherwise it could interfere with normal functioning. Especially if we run a script that then runs ls or dirname or pwd or something, and we start printing logging messages! Oops. --- renderdoc/core/core.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/renderdoc/core/core.cpp b/renderdoc/core/core.cpp index 48f7b5b1a..83b855ab2 100644 --- a/renderdoc/core/core.cpp +++ b/renderdoc/core/core.cpp @@ -337,8 +337,11 @@ void RenderDoc::Initialise() } // begin printing to stdout/stderr after this point, earlier logging is debugging - // cruft that we don't want cluttering output - RDCLOGOUTPUT(); + // cruft that we don't want cluttering output. + // However we don't want to print in captured applications, since they may be outputting important + // information to stdout/stderr and being piped around and processed! + if(IsReplayApp()) + RDCLOGOUTPUT(); } RenderDoc::~RenderDoc()