From 70c3e2fe0fc6e16049fcc3f709f68f2bea09ee9f Mon Sep 17 00:00:00 2001 From: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:05:03 +0000 Subject: [PATCH] FGO: fix printer hook always being enabled (#60) that moment when the printer says OK but it absolutely isn't supposed to be OK lmao edit: I'm not sure why the msvc commits are also in all of these PRs, they have no effect though... Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/60 Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> --- fgohook/dllmain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fgohook/dllmain.c b/fgohook/dllmain.c index a65cbcd..fcf5132 100644 --- a/fgohook/dllmain.c +++ b/fgohook/dllmain.c @@ -82,8 +82,10 @@ static DWORD CALLBACK fgo_pre_startup(void) /* Hook external DLL APIs */ printer_hook_init(&fgo_hook_cfg.printer, 4, fgo_hook_mod); - dll_hook_push(fgo_hook_mod, L"C330Ausb.dll"); - dll_hook_push(fgo_hook_mod, L"C330AFWDLusb.dll"); + if (fgo_hook_cfg.printer.enable) { + dll_hook_push(fgo_hook_mod, L"C330Ausb.dll"); + dll_hook_push(fgo_hook_mod, L"C330AFWDLusb.dll"); + } /* Initialize emulation hooks */