From f5c709255100ae53f2556fab55cbd8dc5ec84c55 Mon Sep 17 00:00:00 2001 From: Hirek Date: Thu, 21 Aug 2025 20:19:12 +0200 Subject: [PATCH] Move crash handling logic for windows only blocks --- EU07.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/EU07.cpp b/EU07.cpp index 29ed7d7b..f0e3a483 100644 --- a/EU07.cpp +++ b/EU07.cpp @@ -22,9 +22,11 @@ Stele, firleju, szociu, hunter, ZiomalCl, OLI_EU and others #include "Logs.h" #include #ifdef WITHDUMPGEN +#ifdef _WIN32 #include #include #endif +#endif #ifdef _MSC_VER #pragma comment(linker, "/subsystem:console /ENTRY:mainCRTStartup") @@ -40,6 +42,8 @@ void export_e3d_standalone(std::string in, std::string out, int flags, bool dyna #include #include #include + +#ifdef _WIN32 #pragma comment(lib, "Dbghelp.lib") LONG WINAPI CrashHandler(EXCEPTION_POINTERS *ExceptionInfo) @@ -76,7 +80,9 @@ LONG WINAPI CrashHandler(EXCEPTION_POINTERS *ExceptionInfo) int main(int argc, char *argv[]) { #ifdef WITHDUMPGEN +#ifdef _WIN32 SetUnhandledExceptionFilter(CrashHandler); + #endif #endif // init start timestamp Global.startTimestamp = std::chrono::steady_clock::now();