summaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/OVR_CAPI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/OVR_CAPI.cpp')
-rw-r--r--LibOVR/Src/OVR_CAPI.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/LibOVR/Src/OVR_CAPI.cpp b/LibOVR/Src/OVR_CAPI.cpp
index a7f921f..497d1a2 100644
--- a/LibOVR/Src/OVR_CAPI.cpp
+++ b/LibOVR/Src/OVR_CAPI.cpp
@@ -670,7 +670,11 @@ OVR_EXPORT ovrEyeRenderDesc ovrHmd_GetRenderDesc(ovrHmd hmd,
-#define OVR_OFFSET_OF(s, field) ((size_t)&((s*)0)->field)
+#if defined(OVR_CC_MSVC)
+ #define OVR_OFFSET_OF(s, field) ((size_t)&((s*)0)->field)
+#else
+ #define OVR_OFFSET_OF(s, field) (1)
+#endif