diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 263a9bae..e14880de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true - name: install-dependencies diff --git a/resources/legend_g_plugin.exe b/resources/legend_g_plugin.exe index f74099d1..9413cedd 100644 Binary files a/resources/legend_g_plugin.exe and b/resources/legend_g_plugin.exe differ diff --git a/src/hook.cpp b/src/hook.cpp index 91f1f8d6..aaefc4b5 100644 --- a/src/hook.cpp +++ b/src/hook.cpp @@ -891,7 +891,7 @@ namespace void* wndproc_orig = nullptr; bool raceStart = false; - + bool gameClosing = false; LRESULT wndproc_hook(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { if (uMsg == WM_INPUT) @@ -931,7 +931,11 @@ namespace } } if (uMsg == WM_CLOSE) { + if (gameClosing) return reinterpret_cast(wndproc_orig)(hWnd, uMsg, wParam, lParam); + + gameClosing = true; const int result = MessageBoxW(hWnd, L"Are you sure to exit?", L"Exit Game", MB_ICONQUESTION | MB_YESNO); + gameClosing = false; if (result != IDYES) return FALSE; }