From 922da0e914eaa7eef423af42c517a4f7850661f8 Mon Sep 17 00:00:00 2001 From: "Neil R. Spruit" Date: Fri, 15 Nov 2024 11:57:17 -0800 Subject: [PATCH] Fix windows build for dllmain Signed-off-by: Neil R. Spruit --- source/lib/windows/lib_init.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/source/lib/windows/lib_init.cpp b/source/lib/windows/lib_init.cpp index 07f7fa46..db47b9a9 100644 --- a/source/lib/windows/lib_init.cpp +++ b/source/lib/windows/lib_init.cpp @@ -13,16 +13,7 @@ namespace ze_lib { -#ifdef DYNAMIC_LOAD_LOADER - export "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_DETACH) { - delete context; - } else if (fdwReason == DLL_PROCESS_ATTACH) { - context = new context_t; - } - return TRUE; - } -#else +#ifndef DYNAMIC_LOAD_LOADER extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { if (fdwReason == DLL_PROCESS_DETACH) { delete context;