diff options
Diffstat (limited to 'LibOVRKernel')
-rw-r--r-- | LibOVRKernel/Src/Kernel/OVR_Log.cpp | 2 | ||||
-rw-r--r-- | LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/LibOVRKernel/Src/Kernel/OVR_Log.cpp b/LibOVRKernel/Src/Kernel/OVR_Log.cpp index 4f8fc53..f39c654 100644 --- a/LibOVRKernel/Src/Kernel/OVR_Log.cpp +++ b/LibOVRKernel/Src/Kernel/OVR_Log.cpp @@ -449,11 +449,13 @@ void SetAssertionHandler(OVRAssertionHandler assertionHandler, intptr_t userPara intptr_t DefaultAssertionHandler(intptr_t /*userParameter*/, const char* title, const char* message) { +#if !defined(HEADLESS_APP) if(OVRIsDebuggerPresent()) { OVR_DEBUG_BREAK; } else +#endif /* !defined(HEADLESS_APP) */ { OVR_UNUSED(title); OVR_UNUSED(message); diff --git a/LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp b/LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp index 8cba464..736b734 100644 --- a/LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp +++ b/LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp @@ -920,7 +920,7 @@ DWORD WINAPI Thread_Win32StartFn(void *phandle) // Ensure that ThreadId is assigned once thread is running, in case // beginthread hasn't filled it in yet. - pthread->IdValue = (ThreadId)::GetCurrentThreadId(); + pthread->IdValue = (ThreadId)(intptr_t)::GetCurrentThreadId(); // should be: typedef intptr_t ThreadId; DWORD result = pthread->PRun(); // Signal the thread as done and release it atomically. @@ -1079,7 +1079,8 @@ void Thread::SetThreadName( const char* name ) void Thread::SetThreadName(const char* name, ThreadId threadId) { - #if !defined(OVR_BUILD_SHIPPING) || defined(OVR_BUILD_PROFILING) + // MinGW does not support SEH exceptions, hence CPP: && defined(OVR_CC_MSVC) + #if ( !defined(OVR_BUILD_SHIPPING) || defined(OVR_BUILD_PROFILING) ) && defined(OVR_CC_MSVC) // http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx #pragma pack(push,8) struct THREADNAME_INFO { @@ -1106,7 +1107,7 @@ void Thread::SetThreadName(const char* name, ThreadId threadId) void Thread::SetCurrentThreadName( const char* name ) { - SetThreadName(name, (ThreadId)::GetCurrentThreadId()); + SetThreadName(name, (ThreadId)(intptr_t)::GetCurrentThreadId()); // should be: typedef intptr_t ThreadId; } @@ -1142,7 +1143,7 @@ int Thread::GetCPUCount() // comparison purposes. ThreadId GetCurrentThreadId() { - return (ThreadId)::GetCurrentThreadId(); + return (ThreadId)(intptr_t)::GetCurrentThreadId(); // should be: typedef intptr_t ThreadId; } } // OVR |