From 1b614c94a7f8792db2b79071863b174948f8b972 Mon Sep 17 00:00:00 2001 From: bicarus-dev <202771338+bicarus-dev@users.noreply.github.com> Date: Thu, 6 Nov 2025 17:51:39 -0800 Subject: [PATCH] mfc: remove log spam (#418) ## Link to GitHub Issue, if one exists n/a ## Description of change Remove mutex lock/unlock log spam Are they important? Idk ## Testing --- src/spice2x/games/mfc/mfc.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/spice2x/games/mfc/mfc.cpp b/src/spice2x/games/mfc/mfc.cpp index e9f49d6..0f3984f 100644 --- a/src/spice2x/games/mfc/mfc.cpp +++ b/src/spice2x/games/mfc/mfc.cpp @@ -288,6 +288,21 @@ namespace games::mfc { MFCGame::MFCGame() : Game("Mahjong Fight Club") { } + static bool spam_remover(void *user, const std::string &data, logger::Style style, std::string &out) { + if (data.empty() || data[0] != '[') { + return false; + } + if (data.find("W:mutex: lock: mid 00000000 != AVS_DTYPE_MUTEX") != std::string::npos) { + out = ""; + return true; + } + if (data.find("W:mutex: unlock: mid 00000000 != AVS_DTYPE_MUTEX") != std::string::npos) { + out = ""; + return true; + } + return false; + } + void MFCGame::attach() { Game::attach(); @@ -385,5 +400,7 @@ namespace games::mfc { detour::inline_hook((void *) mouse_utl_step, libutils::try_proc( allinone_module, "?mouse_utl_step@@YAXXZ")); } + + logger::hook_add(spam_remover, nullptr); } }