mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix logfiles not being deleted if captured application is the last user
* Previously only the UI itself would delete the log if it was the last thing to close.
This commit is contained in:
@@ -292,10 +292,10 @@ void rdclog_enableoutput()
|
||||
log_output_enabled = true;
|
||||
}
|
||||
|
||||
void rdclog_closelog(const char *filename)
|
||||
void rdclog_closelog()
|
||||
{
|
||||
log_output_enabled = false;
|
||||
FileIO::logfile_close(logfileHandle, filename);
|
||||
FileIO::logfile_close(logfileHandle, logfile.c_str());
|
||||
}
|
||||
|
||||
void rdclog_flush()
|
||||
|
||||
@@ -443,13 +443,13 @@ void rdclog_direct(time_t utcTime, uint32_t pid, LogType type, const char *proje
|
||||
const char *rdclog_getfilename();
|
||||
void rdclog_filename(const char *filename);
|
||||
void rdclog_enableoutput();
|
||||
void rdclog_closelog(const char *filename);
|
||||
void rdclog_closelog();
|
||||
|
||||
#define RDCLOGFILE(fn) rdclog_filename(fn)
|
||||
#define RDCGETLOGFILE() rdclog_getfilename()
|
||||
|
||||
#define RDCLOGOUTPUT() rdclog_enableoutput()
|
||||
#define RDCSTOPLOGGING(filename) rdclog_closelog(filename)
|
||||
#define RDCSTOPLOGGING() rdclog_closelog()
|
||||
|
||||
#if(ENABLED(RDOC_DEVEL) || ENABLED(FORCE_DEBUG_LOGS)) && DISABLED(STRIP_DEBUG_LOGS)
|
||||
#define RDCDEBUG(...) rdclog(LogType::Debug, __VA_ARGS__)
|
||||
|
||||
@@ -486,7 +486,7 @@ RenderDoc::~RenderDoc()
|
||||
}
|
||||
}
|
||||
|
||||
RDCSTOPLOGGING(m_LoggingFilename.c_str());
|
||||
RDCSTOPLOGGING();
|
||||
|
||||
if(m_RemoteThread)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user