From 96c4b332f667054630349b70095ebaaa358e4065 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 3 Mar 2015 11:33:16 +0100 Subject: [PATCH] FileMonitor: Check log level in addition to FileMonitor checkbox This is good for performance when FileMontior is selected but the log level only is set to notice or warning. The ability to do this wasn't available until recently: 1ed41672f50c9cfe7aa4ab5aa3b73f7e41029124 --- Source/Core/DiscIO/FileMonitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DiscIO/FileMonitor.cpp b/Source/Core/DiscIO/FileMonitor.cpp index e93855c4ee..48ab314c5f 100644 --- a/Source/Core/DiscIO/FileMonitor.cpp +++ b/Source/Core/DiscIO/FileMonitor.cpp @@ -96,7 +96,7 @@ void ReadFileSystem(const std::string& filename) void CheckFile(const std::string& file, u64 size) { // Don't do anything if the log is unselected - if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) + if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON, LogTypes::LWARNING)) return; // Do nothing if we found the same file again if (CurrentFile == file) @@ -128,7 +128,7 @@ void FindFilename(u64 offset) return; // Or if the log is unselected - if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) + if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON, LogTypes::LWARNING)) return; // Or if we don't have file access