From 8b211a73d77a0bcf34241101fac90f0525ab407c Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 28 Sep 2024 19:57:11 +0200 Subject: [PATCH] add checks for windows ME build --- src/dllmain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dllmain.c b/src/dllmain.c index 6ab24f4..04b4ea9 100644 --- a/src/dllmain.c +++ b/src/dllmain.c @@ -47,8 +47,10 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) cfg_load(); +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) g_dbg_exception_handle = AddVectoredExceptionHandler(1, (PVECTORED_EXCEPTION_HANDLER)dbg_vectored_exception_handler); +#endif char buf[1024]; @@ -146,8 +148,10 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) dinput_hook_exit(); hook_exit(); +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) if (g_dbg_exception_handle) RemoveVectoredExceptionHandler(g_dbg_exception_handle); +#endif break; }