diff --git a/src/bnusio.cpp b/src/bnusio.cpp index d1c2dcb..397964b 100644 --- a/src/bnusio.cpp +++ b/src/bnusio.cpp @@ -475,16 +475,18 @@ Update () { insertEvent = GetProcAddress (plugin, p1 ? "Card1Insert" : "Card2Insert"); if (insertEvent) { ((event *)insertEvent) (); - hasInserted = true; + hasInserted = true; + waitingForTouch = false; break; } } if (!hasInserted) { - LogMessage (LOG_LEVEL_INFO, "Inserting card for player %d: %s", p1 ? "1" : "2", p1 ? accessCode1 : accessCode2); + LogMessage (LOG_LEVEL_INFO, "Inserting card for player %d: %s", p1 ? 1 : 2, p1 ? accessCode1 : accessCode2); memcpy (cardData + 0x2C, p1 ? chipId1 : chipId2, 33); memcpy (cardData + 0x50, p1 ? accessCode1 : accessCode2, 21); touchCallback (0, 0, cardData, touchData); + waitingForTouch = false; } } } diff --git a/src/dllmain.cpp b/src/dllmain.cpp index f9dd2bd..b0f94ac 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -43,13 +43,12 @@ HOOK (HWND, CreateWindow, PROC_ADDRESS ("user32.dll", "CreateWindowExW"), DWORD if (wcscmp (lpWindowName, L"Taiko") == 0) { if (windowed) dwStyle = WS_TILEDWINDOW ^ WS_MAXIMIZEBOX ^ WS_THICKFRAME; - hGameWnd = originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, - hInstance, lpParam); + hGameWnd + = originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); return hGameWnd; } } - return originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, - lpParam); + return originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); } HOOK (bool, SetWindowPosition, PROC_ADDRESS ("user32.dll", "SetWindowPos"), HWND hWnd, HWND hWndInsertAfter, i32 X, i32 Y, i32 cx, i32 cy, u32 uFlags) { @@ -242,6 +241,8 @@ DllMain (HMODULE module, DWORD reason, LPVOID reserved) { GetPrivateProfileStringA ("card", "accessCode2", accessCode2, accessCode2, 21, ".\\card.ini"); GetPrivateProfileStringA ("card", "chipId2", chipId2, chipId2, 33, ".\\card.ini"); + LogMessage (LOG_LEVEL_WARN, "Loading patches, please wait..."); + INSTALL_HOOK (ShowMouse); INSTALL_HOOK (ExitWindows); INSTALL_HOOK (CreateWindow); diff --git a/src/patches/amauth.cpp b/src/patches/amauth.cpp index 941932c..aad35ff 100644 --- a/src/patches/amauth.cpp +++ b/src/patches/amauth.cpp @@ -559,7 +559,7 @@ CoCreateInstanceHook (const IID *const rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsC void Init () { - LogMessage (LOG_LEVEL_DEBUG, "Init AmAuth patches"); + LogMessage (LOG_LEVEL_INFO, "Init AmAuth patches"); MH_Initialize (); MH_CreateHookApi (L"ole32.dll", "CoCreateInstance", (LPVOID)CoCreateInstanceHook, diff --git a/src/patches/audio.cpp b/src/patches/audio.cpp index c2fa487..b33db11 100644 --- a/src/patches/audio.cpp +++ b/src/patches/audio.cpp @@ -42,7 +42,7 @@ HOOK_DYNAMIC (bool, LoadASIODriver, void *a1, const char *a2) { void Init () { - LogMessage (LOG_LEVEL_DEBUG, "Init Audio patches"); + LogMessage (LOG_LEVEL_INFO, "Init Audio patches"); auto configPath = std::filesystem::current_path () / "config.toml"; std::unique_ptr config_ptr (openConfig (configPath), toml_free); diff --git a/src/patches/dxgi.cpp b/src/patches/dxgi.cpp index 36e372c..f4abd88 100644 --- a/src/patches/dxgi.cpp +++ b/src/patches/dxgi.cpp @@ -201,7 +201,7 @@ D3D11CreateDeviceAndSwapChainWrap (IDXGIAdapter *pAdapter, D3D_DRIVER_TYPE Drive void Init () { - LogMessage (LOG_LEVEL_DEBUG, "Init Dxgi patches"); + LogMessage (LOG_LEVEL_INFO, "Init Dxgi patches"); i32 fpsLimit = 120; auto configPath = std::filesystem::current_path () / "config.toml"; diff --git a/src/patches/fpslimiter.cpp b/src/patches/fpslimiter.cpp index 0436e80..4abe6d7 100644 --- a/src/patches/fpslimiter.cpp +++ b/src/patches/fpslimiter.cpp @@ -16,7 +16,7 @@ static u32 i = 0; void Init (float fpsLimit) { - if (fpsLimit > 0) LogMessage (LOG_LEVEL_DEBUG, "Init Fps Limiter"); + if (fpsLimit > 0) LogMessage (LOG_LEVEL_INFO, "Init Fps Limiter"); targetFrameTime = 1000.0 / fpsLimit; } diff --git a/src/patches/layeredfs.cpp b/src/patches/layeredfs.cpp index 43b53fc..fd34bad 100644 --- a/src/patches/layeredfs.cpp +++ b/src/patches/layeredfs.cpp @@ -311,7 +311,7 @@ HOOK (HANDLE, CreateFileAHook, PROC_ADDRESS ("kernel32.dll", "CreateFileA"), LPC void Init () { - LogMessage (LOG_LEVEL_DEBUG, "Init LayeredFs patches"); + LogMessage (LOG_LEVEL_INFO, "Init LayeredFs patches"); auto configPath = std::filesystem::current_path () / "config.toml"; std::unique_ptr config_ptr (openConfig (configPath), toml_free); diff --git a/src/patches/qr.cpp b/src/patches/qr.cpp index 58c6cf8..a0e124e 100644 --- a/src/patches/qr.cpp +++ b/src/patches/qr.cpp @@ -231,7 +231,7 @@ Update () { void Init () { - LogMessage (LOG_LEVEL_DEBUG, "Init Qr patches"); + LogMessage (LOG_LEVEL_INFO, "Init Qr patches"); if (!emulateQr) { LogMessage (LOG_LEVEL_WARN, "QR emulation disabled"); diff --git a/src/patches/testmode.cpp b/src/patches/testmode.cpp index 5316470..d5b570a 100644 --- a/src/patches/testmode.cpp +++ b/src/patches/testmode.cpp @@ -287,7 +287,7 @@ LocalizationCHS () { void Init () { - LogMessage (LOG_LEVEL_DEBUG, "Init TestMode patches"); + LogMessage (LOG_LEVEL_INFO, "Init TestMode patches"); auto configPath = std::filesystem::current_path () / "config.toml"; std::unique_ptr config_ptr (openConfig (configPath), toml_free); diff --git a/src/patches/versions/CHN00.cpp b/src/patches/versions/CHN00.cpp index d1639f6..d6f3e1f 100644 --- a/src/patches/versions/CHN00.cpp +++ b/src/patches/versions/CHN00.cpp @@ -101,6 +101,7 @@ ReplaceLeaBufferAddress (const std::vector &bufferAddresses, void *ne void Init () { + LogMessage (LOG_LEVEL_INFO, "Init CHN00 patches"); i32 xRes = 1920; i32 yRes = 1080; bool vsync = false; diff --git a/src/patches/versions/JPN00.cpp b/src/patches/versions/JPN00.cpp index cf15f84..1e5258e 100644 --- a/src/patches/versions/JPN00.cpp +++ b/src/patches/versions/JPN00.cpp @@ -37,6 +37,7 @@ ReplaceLeaBufferAddress (const std::vector &bufferAddresses, void *ne void Init () { + LogMessage (LOG_LEVEL_INFO, "Init JNP00 patches"); i32 xRes = 1920; i32 yRes = 1080; bool vsync = false; diff --git a/src/patches/versions/JPN08.cpp b/src/patches/versions/JPN08.cpp index 86dbcf3..6c417e6 100644 --- a/src/patches/versions/JPN08.cpp +++ b/src/patches/versions/JPN08.cpp @@ -48,6 +48,7 @@ ReplaceLeaBufferAddress (const std::vector &bufferAddresses, void *ne void Init () { + LogMessage (LOG_LEVEL_INFO, "Init JPN08 patches"); i32 xRes = 1920; i32 yRes = 1080; bool vsync = false; diff --git a/src/patches/versions/JPN39.cpp b/src/patches/versions/JPN39.cpp index 284e344..9eb313c 100644 --- a/src/patches/versions/JPN39.cpp +++ b/src/patches/versions/JPN39.cpp @@ -410,6 +410,7 @@ ReplaceLeaBufferAddress (const std::vector &bufferAddresses, void *ne void Init () { + LogMessage (LOG_LEVEL_INFO, "Init JPN39 patches"); i32 xRes = 1920; i32 yRes = 1080; bool vsync = false;