From 8dfeeb354fd6fee493edf27ebbbf1df016f8dba6 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Sun, 4 Feb 2018 15:36:17 +0000 Subject: [PATCH] pcsx2: Fix Trace Logging enable/disable behaviour This disables SIF logging if the master trace logging switch has been disabled. --- pcsx2/DebugTools/Debug.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pcsx2/DebugTools/Debug.h b/pcsx2/DebugTools/Debug.h index 5571a5e1d7..5345612eb1 100644 --- a/pcsx2/DebugTools/Debug.h +++ b/pcsx2/DebugTools/Debug.h @@ -72,7 +72,10 @@ public: : TextFileTraceLog( &desc->base ) {} void DoWrite( const char *fmt ) const; - + bool IsActive() const override + { + return EmuConfig.Trace.Enabled && Enabled; + } }; class SysTraceLog_EE : public SysTraceLog @@ -85,7 +88,7 @@ public: void ApplyPrefix( FastFormatAscii& ascii ) const; bool IsActive() const { - return EmuConfig.Trace.Enabled && Enabled && EmuConfig.Trace.EE.m_EnableAll; + return SysTraceLog::IsActive() && EmuConfig.Trace.EE.m_EnableAll; } wxString GetCategory() const { return L"EE"; } @@ -157,7 +160,7 @@ public: void ApplyPrefix( FastFormatAscii& ascii ) const; bool IsActive() const { - return EmuConfig.Trace.Enabled && Enabled && EmuConfig.Trace.IOP.m_EnableAll; + return SysTraceLog::IsActive() && EmuConfig.Trace.IOP.m_EnableAll; } wxString GetCategory() const { return L"IOP"; }