More mingw patches pt. 2

This commit is contained in:
twinaphex committed 2017-08-29 22:41:50 +02:00
1 parent db404adb95
commit a9bf8e7b18
7 files changed
+23 -12

No files matched your search

+11
View File
@@ -1,5 +1,8 @@
#ifdef _WIN32
#include <windows.h>
#ifdef __MINGW32__
#include <excpt.h>
#endif
#define TLS_SUPPORTED
#elif defined(__ANDROID__)
#define TLS_SUPPORTED
@@ -35,11 +38,19 @@ void setCurrentThreadName(const char* threadName) {
info.dwThreadID = -1; //dwThreadID;
info.dwFlags = 0;
#ifdef __MINGW32__
__try1 (ehandler)
#else
__try
#endif
{
RaiseException(MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info);
}
#ifdef __MINGW32__
__except1
#else
__except(EXCEPTION_CONTINUE_EXECUTION)
#endif
{}
#else