From 69dc9f80312224a93b09e1bb456c23824b87337a Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 15 Feb 2019 11:55:51 +0000 Subject: [PATCH] Print prefixed output in a single call to rdclogprint_int * On android each call to rdclogprint_int goes onto its own line in the logcat output, so we need to combine the prefix externally. --- renderdoc/common/common.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/renderdoc/common/common.cpp b/renderdoc/common/common.cpp index a81689185..e63c0cb1a 100644 --- a/renderdoc/common/common.cpp +++ b/renderdoc/common/common.cpp @@ -511,9 +511,10 @@ void rdclog_direct(time_t utcTime, uint32_t pid, LogType type, const char *proje write_newline(nl); - if(!first) - rdclogprint_int(type, prefixText.c_str(), prefixText.c_str()); - rdclogprint_int(type, base, noPrefixOutput); + if(first) + rdclogprint_int(type, base, noPrefixOutput); + else + rdclogprint_int(type, (prefixText + base).c_str(), noPrefixOutput); // restore the characters nl[1] = backup[0]; @@ -530,9 +531,10 @@ void rdclog_direct(time_t utcTime, uint32_t pid, LogType type, const char *proje // append final newline and write the last line write_newline(output); - if(!first) - rdclogprint_int(type, prefixText.c_str(), prefixText.c_str()); - rdclogprint_int(type, base, noPrefixOutput); + if(first) + rdclogprint_int(type, base, noPrefixOutput); + else + rdclogprint_int(type, (prefixText + base).c_str(), noPrefixOutput); } SAFE_DELETE_ARRAY(oversizedBuffer);