From 37c5913f69f401fcb8c8faa46ee46ae2d8f2b241 Mon Sep 17 00:00:00 2001 From: bicarus-dev <202771338+bicarus-dev@users.noreply.github.com> Date: Wed, 5 Nov 2025 19:23:10 -0800 Subject: [PATCH] mfc: detect 2025 version (#416) ## Link to GitHub Issue, if one exists n/a ## Description of change They moved some DLLs around so MFC wasn't being auto-detected, and I/O hooks were not being performed. Fix that. ## Testing The game boots into test menu, some i/o works, touch doesn't, not playable yet. --- src/spice2x/games/mfc/mfc.cpp | 7 +++++++ src/spice2x/launcher/launcher.cpp | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/src/spice2x/games/mfc/mfc.cpp b/src/spice2x/games/mfc/mfc.cpp index bf6e91c..e9f49d6 100644 --- a/src/spice2x/games/mfc/mfc.cpp +++ b/src/spice2x/games/mfc/mfc.cpp @@ -308,6 +308,13 @@ namespace games::mfc { auto allinone_module = libutils::try_module("allinone.dll"); auto system_module = libutils::try_module("system.dll"); + // Mahjong Fight Club - 2025? + // they removed allinone.dll and moved i/o into system.dll + if (allinone_module == nullptr) { + log_misc("mfc", "using system.dll instead of allinone.dll for i/o hooks"); + allinone_module = system_module; + } + // network fix detour::iat_try("?nic_dhcp_maybe_exist@@YAEXZ", nic_dhcp_maybe_exist, system_module); diff --git a/src/spice2x/launcher/launcher.cpp b/src/spice2x/launcher/launcher.cpp index 3fc02f3..7e4b2be 100644 --- a/src/spice2x/launcher/launcher.cpp +++ b/src/spice2x/launcher/launcher.cpp @@ -1676,6 +1676,14 @@ int main_implementation(int argc, char *argv[]) { attach_io = true; attach_mfc = true; break; + + // Mahjong Fight Club - 2025? + // they removed allinone.dll and moved i/o into system.dll + } else if (check_dll("system.dll") && fileutils::file_exists("data/mfc.ini")) { + avs::game::DLL_NAME = "system.dll"; + attach_io = true; + attach_mfc = true; + break; } // FutureTomTom