Skip to content

Commit

Permalink
add checks for windows ME build
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Sep 28, 2024
1 parent beae3c5 commit 8b211a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 8b211a7

Please sign in to comment.