fix: Use Win32 functions to terminate thread on Windows

This commit is contained in:
WerWolv
2025-08-30 11:19:40 +02:00
parent 6ab1f8e4e2
commit bcbe5eb105

View File

@@ -85,7 +85,11 @@ namespace hex::crash {
});
// Terminate this thread
pthread_kill(pthread_self(), SIGABRT);
#if defined(_MSC_VER)
TerminateThread(GetCurrentThread(), EXIT_FAILURE);
#else
pthread_kill(pthread_self(), SIGABRT);
#endif
while (true) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));