aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Davis <[email protected]>2014-02-07 13:15:34 -0800
committerBrad Davis <[email protected]>2014-02-07 13:15:34 -0800
commitd765192495783dea9bcca452e8bf8369eb2a06a5 (patch)
tree9bd15a95f13203dde8b1c9674ee64b8df462c689
parent6c8ba1f0cdd9e2bb435e2bcc6109073e4fbc79c5 (diff)
parentda90f8541ad754ef6bbcb3fada6676fc827be011 (diff)
Merge pull request #27 from ali1234/stable
Compilation fixes for mingw
-rw-r--r--LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp2
-rw-r--r--LibOVR/Src/OVR_Profile.cpp2
-rw-r--r--LibOVR/Src/OVR_SensorFusion.cpp2
-rw-r--r--LibOVR/Src/OVR_Win32_HIDDevice.cpp2
4 files changed, 5 insertions, 3 deletions
diff --git a/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp b/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp
index 8880082..30e8656 100644
--- a/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp
+++ b/LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp
@@ -969,6 +969,7 @@ void Thread::SetThreadName( const char* name )
info.dwThreadID = reinterpret_cast<DWORD>(GetThreadId());
info.dwFlags = 0;
+#if !defined(__MINGW32__) // FIXME: Port this to mingw.
__try
{
#ifdef _WIN64
@@ -980,6 +981,7 @@ void Thread::SetThreadName( const char* name )
__except( GetExceptionCode()==0x406D1388 ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER )
{
}
+#endif // __MINGW32__
#endif // OVR_BUILD_SHIPPING
}
diff --git a/LibOVR/Src/OVR_Profile.cpp b/LibOVR/Src/OVR_Profile.cpp
index fdac5d7..7c2897d 100644
--- a/LibOVR/Src/OVR_Profile.cpp
+++ b/LibOVR/Src/OVR_Profile.cpp
@@ -39,7 +39,7 @@ limitations under the License.
#include "Kernel/OVR_Array.h"
#ifdef OVR_OS_WIN32
-#include <Shlobj.h>
+#include <shlobj.h>
#else
#include <dirent.h>
#include <sys/stat.h>
diff --git a/LibOVR/Src/OVR_SensorFusion.cpp b/LibOVR/Src/OVR_SensorFusion.cpp
index eac0366..a2248d1 100644
--- a/LibOVR/Src/OVR_SensorFusion.cpp
+++ b/LibOVR/Src/OVR_SensorFusion.cpp
@@ -561,7 +561,7 @@ bool SensorFusion::LoadMagCalibration(const char* calibrationName)
tm ct;
memset(&ct, 0, sizeof(tm));
-#ifdef OVR_OS_WIN32
+#if defined OVR_OS_WIN32 && !defined(__MINGW32__)
struct tm nowtime;
localtime_s(&nowtime, &now);
ct.tm_isdst = nowtime.tm_isdst;
diff --git a/LibOVR/Src/OVR_Win32_HIDDevice.cpp b/LibOVR/Src/OVR_Win32_HIDDevice.cpp
index 81a6c8a..b93e9cc 100644
--- a/LibOVR/Src/OVR_Win32_HIDDevice.cpp
+++ b/LibOVR/Src/OVR_Win32_HIDDevice.cpp
@@ -292,7 +292,7 @@ bool HIDDevice::HIDInitialize(const String& path)
if (!openDevice())
{
- LogText("OVR::Win32::HIDDevice - Failed to open HIDDevice: ", path);
+ LogText("OVR::Win32::HIDDevice - Failed to open HIDDevice: ", path.ToCStr());
return false;
}