summaryrefslogtreecommitdiffstats
path: root/LibOVR
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-19 17:18:53 +0200
committerSven Gothel <[email protected]>2014-06-19 17:18:53 +0200
commitda82e664d359c540e96e4602fd5980003bff3e5c (patch)
tree81698246c6c13bcf21ed9c12bcf10e983fa525ba /LibOVR
parent33385ba1bb04682cef372adb0cd9f63b1fe55ca7 (diff)
Merge OculusSDK 0.3.2 MacOS Source Code
- converted all text files to unix format first, allowing to skip all white-changes-only files
Diffstat (limited to 'LibOVR')
-rw-r--r--LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj731
-rw-r--r--LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata7
-rw-r--r--LibOVR/Src/OVR_OSX_DeviceManager.cpp360
-rw-r--r--LibOVR/Src/OVR_OSX_DeviceManager.h128
-rw-r--r--LibOVR/Src/OVR_OSX_HIDDevice.cpp924
-rw-r--r--LibOVR/Src/OVR_OSX_HIDDevice.h160
-rw-r--r--LibOVR/Src/OVR_OSX_HMDDevice.cpp264
-rw-r--r--LibOVR/Src/OVR_OSX_HMDDevice.h153
-rw-r--r--LibOVR/Src/OVR_OSX_SensorDevice.cpp58
9 files changed, 2785 insertions, 0 deletions
diff --git a/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..485af04
--- /dev/null
+++ b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.pbxproj
@@ -0,0 +1,731 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ E8754F81190F1B71005FD401 /* OVR_Recording.h in Headers */ = {isa = PBXBuildFile; fileRef = E8754F7F190F1B71005FD401 /* OVR_Recording.h */; };
+ E886FE9E190737FA00D5DB45 /* OVR_CAPI_GL.h in Headers */ = {isa = PBXBuildFile; fileRef = E886FE9B190737FA00D5DB45 /* OVR_CAPI_GL.h */; };
+ E886FE9F190737FA00D5DB45 /* OVR_CAPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E886FE9C190737FA00D5DB45 /* OVR_CAPI.cpp */; };
+ E886FEA0190737FA00D5DB45 /* OVR_CAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E886FE9D190737FA00D5DB45 /* OVR_CAPI.h */; };
+ E886FEA21907528C00D5DB45 /* CAPI_DistortionRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E886FEA11907528C00D5DB45 /* CAPI_DistortionRenderer.cpp */; };
+ E8AA40D11907221900D5F144 /* OVR_Alg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40A61907221900D5F144 /* OVR_Alg.cpp */; };
+ E8AA40D21907221900D5F144 /* OVR_Alg.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40A71907221900D5F144 /* OVR_Alg.h */; };
+ E8AA40D31907221900D5F144 /* OVR_Allocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40A81907221900D5F144 /* OVR_Allocator.cpp */; };
+ E8AA40D41907221900D5F144 /* OVR_Allocator.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40A91907221900D5F144 /* OVR_Allocator.h */; };
+ E8AA40D51907221900D5F144 /* OVR_Array.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AA1907221900D5F144 /* OVR_Array.h */; };
+ E8AA40D61907221900D5F144 /* OVR_Atomic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40AB1907221900D5F144 /* OVR_Atomic.cpp */; };
+ E8AA40D71907221900D5F144 /* OVR_Atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AC1907221900D5F144 /* OVR_Atomic.h */; };
+ E8AA40D81907221900D5F144 /* OVR_Color.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AD1907221900D5F144 /* OVR_Color.h */; };
+ E8AA40D91907221900D5F144 /* OVR_ContainerAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AE1907221900D5F144 /* OVR_ContainerAllocator.h */; };
+ E8AA40DA1907221900D5F144 /* OVR_Deque.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40AF1907221900D5F144 /* OVR_Deque.h */; };
+ E8AA40DB1907221900D5F144 /* OVR_File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B01907221900D5F144 /* OVR_File.cpp */; };
+ E8AA40DC1907221900D5F144 /* OVR_File.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B11907221900D5F144 /* OVR_File.h */; };
+ E8AA40DD1907221900D5F144 /* OVR_FileFILE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B21907221900D5F144 /* OVR_FileFILE.cpp */; };
+ E8AA40DE1907221900D5F144 /* OVR_Hash.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B31907221900D5F144 /* OVR_Hash.h */; };
+ E8AA40DF1907221900D5F144 /* OVR_KeyCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B41907221900D5F144 /* OVR_KeyCodes.h */; };
+ E8AA40E01907221900D5F144 /* OVR_List.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B51907221900D5F144 /* OVR_List.h */; };
+ E8AA40E11907221900D5F144 /* OVR_Lockless.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B61907221900D5F144 /* OVR_Lockless.cpp */; };
+ E8AA40E21907221900D5F144 /* OVR_Lockless.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B71907221900D5F144 /* OVR_Lockless.h */; };
+ E8AA40E31907221900D5F144 /* OVR_Log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40B81907221900D5F144 /* OVR_Log.cpp */; };
+ E8AA40E41907221900D5F144 /* OVR_Log.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40B91907221900D5F144 /* OVR_Log.h */; };
+ E8AA40E51907221900D5F144 /* OVR_Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40BA1907221900D5F144 /* OVR_Math.cpp */; };
+ E8AA40E61907221900D5F144 /* OVR_Math.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40BB1907221900D5F144 /* OVR_Math.h */; };
+ E8AA40E71907221900D5F144 /* OVR_RefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40BC1907221900D5F144 /* OVR_RefCount.cpp */; };
+ E8AA40E81907221900D5F144 /* OVR_RefCount.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40BD1907221900D5F144 /* OVR_RefCount.h */; };
+ E8AA40E91907221900D5F144 /* OVR_Std.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40BE1907221900D5F144 /* OVR_Std.cpp */; };
+ E8AA40EA1907221900D5F144 /* OVR_Std.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40BF1907221900D5F144 /* OVR_Std.h */; };
+ E8AA40EB1907221900D5F144 /* OVR_String.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C01907221900D5F144 /* OVR_String.cpp */; };
+ E8AA40EC1907221900D5F144 /* OVR_String.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C11907221900D5F144 /* OVR_String.h */; };
+ E8AA40ED1907221900D5F144 /* OVR_String_FormatUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C21907221900D5F144 /* OVR_String_FormatUtil.cpp */; };
+ E8AA40EE1907221900D5F144 /* OVR_String_PathUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C31907221900D5F144 /* OVR_String_PathUtil.cpp */; };
+ E8AA40EF1907221900D5F144 /* OVR_StringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C41907221900D5F144 /* OVR_StringHash.h */; };
+ E8AA40F01907221900D5F144 /* OVR_SysFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C51907221900D5F144 /* OVR_SysFile.cpp */; };
+ E8AA40F11907221900D5F144 /* OVR_SysFile.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C61907221900D5F144 /* OVR_SysFile.h */; };
+ E8AA40F21907221900D5F144 /* OVR_System.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40C71907221900D5F144 /* OVR_System.cpp */; };
+ E8AA40F31907221900D5F144 /* OVR_System.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C81907221900D5F144 /* OVR_System.h */; };
+ E8AA40F41907221900D5F144 /* OVR_Threads.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40C91907221900D5F144 /* OVR_Threads.h */; };
+ E8AA40F51907221900D5F144 /* OVR_ThreadsPthread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40CA1907221900D5F144 /* OVR_ThreadsPthread.cpp */; };
+ E8AA40F71907221900D5F144 /* OVR_Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40CC1907221900D5F144 /* OVR_Timer.cpp */; };
+ E8AA40F81907221900D5F144 /* OVR_Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40CD1907221900D5F144 /* OVR_Timer.h */; };
+ E8AA40F91907221900D5F144 /* OVR_Types.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40CE1907221900D5F144 /* OVR_Types.h */; };
+ E8AA40FA1907221900D5F144 /* OVR_UTF8Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA40CF1907221900D5F144 /* OVR_UTF8Util.cpp */; };
+ E8AA40FB1907221900D5F144 /* OVR_UTF8Util.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA40D01907221900D5F144 /* OVR_UTF8Util.h */; };
+ E8AA410D1907224700D5F144 /* Util_Interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41011907224700D5F144 /* Util_Interface.cpp */; };
+ E8AA410E1907224700D5F144 /* Util_Interface.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41021907224700D5F144 /* Util_Interface.h */; };
+ E8AA410F1907224700D5F144 /* Util_LatencyTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41031907224700D5F144 /* Util_LatencyTest.cpp */; };
+ E8AA41101907224700D5F144 /* Util_LatencyTest.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41041907224700D5F144 /* Util_LatencyTest.h */; };
+ E8AA41111907224700D5F144 /* Util_LatencyTest2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41051907224700D5F144 /* Util_LatencyTest2.cpp */; };
+ E8AA41121907224700D5F144 /* Util_LatencyTest2.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41061907224700D5F144 /* Util_LatencyTest2.h */; };
+ E8AA41131907224700D5F144 /* Util_Render_Stereo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41071907224700D5F144 /* Util_Render_Stereo.cpp */; };
+ E8AA41141907224700D5F144 /* Util_Render_Stereo.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41081907224700D5F144 /* Util_Render_Stereo.h */; };
+ E8AA4169190722BB00D5F144 /* OVR_Device.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4121190722BB00D5F144 /* OVR_Device.h */; };
+ E8AA416A190722BB00D5F144 /* OVR_DeviceConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4122190722BB00D5F144 /* OVR_DeviceConstants.h */; };
+ E8AA416B190722BB00D5F144 /* OVR_DeviceHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4123190722BB00D5F144 /* OVR_DeviceHandle.cpp */; };
+ E8AA416C190722BB00D5F144 /* OVR_DeviceHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4124190722BB00D5F144 /* OVR_DeviceHandle.h */; };
+ E8AA416D190722BB00D5F144 /* OVR_DeviceImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4125190722BB00D5F144 /* OVR_DeviceImpl.cpp */; };
+ E8AA416E190722BB00D5F144 /* OVR_DeviceImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4126190722BB00D5F144 /* OVR_DeviceImpl.h */; };
+ E8AA416F190722BB00D5F144 /* OVR_DeviceMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4127190722BB00D5F144 /* OVR_DeviceMessages.h */; };
+ E8AA4170190722BB00D5F144 /* OVR_HIDDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4128190722BB00D5F144 /* OVR_HIDDevice.h */; };
+ E8AA4171190722BB00D5F144 /* OVR_HIDDeviceBase.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4129190722BB00D5F144 /* OVR_HIDDeviceBase.h */; };
+ E8AA4172190722BB00D5F144 /* OVR_HIDDeviceImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA412A190722BB00D5F144 /* OVR_HIDDeviceImpl.h */; };
+ E8AA4173190722BB00D5F144 /* OVR_JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA412B190722BB00D5F144 /* OVR_JSON.cpp */; };
+ E8AA4174190722BB00D5F144 /* OVR_JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA412C190722BB00D5F144 /* OVR_JSON.h */; };
+ E8AA4175190722BB00D5F144 /* OVR_LatencyTestImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA412D190722BB00D5F144 /* OVR_LatencyTestImpl.cpp */; };
+ E8AA4176190722BB00D5F144 /* OVR_LatencyTestImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA412E190722BB00D5F144 /* OVR_LatencyTestImpl.h */; };
+ E8AA417E190722BB00D5F144 /* OVR_OSX_DeviceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4136190722BB00D5F144 /* OVR_OSX_DeviceManager.cpp */; };
+ E8AA417F190722BB00D5F144 /* OVR_OSX_DeviceManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4137190722BB00D5F144 /* OVR_OSX_DeviceManager.h */; };
+ E8AA4180190722BB00D5F144 /* OVR_OSX_HIDDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4138190722BB00D5F144 /* OVR_OSX_HIDDevice.cpp */; };
+ E8AA4181190722BB00D5F144 /* OVR_OSX_HIDDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4139190722BB00D5F144 /* OVR_OSX_HIDDevice.h */; };
+ E8AA4182190722BB00D5F144 /* OVR_OSX_HMDDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA413A190722BB00D5F144 /* OVR_OSX_HMDDevice.cpp */; };
+ E8AA4183190722BB00D5F144 /* OVR_OSX_HMDDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA413B190722BB00D5F144 /* OVR_OSX_HMDDevice.h */; };
+ E8AA4184190722BB00D5F144 /* OVR_OSX_SensorDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA413C190722BB00D5F144 /* OVR_OSX_SensorDevice.cpp */; };
+ E8AA4185190722BB00D5F144 /* OVR_Profile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA413D190722BB00D5F144 /* OVR_Profile.cpp */; };
+ E8AA4186190722BB00D5F144 /* OVR_Profile.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA413E190722BB00D5F144 /* OVR_Profile.h */; };
+ E8AA4187190722BB00D5F144 /* OVR_Sensor2Impl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA413F190722BB00D5F144 /* OVR_Sensor2Impl.cpp */; };
+ E8AA4188190722BB00D5F144 /* OVR_Sensor2Impl.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4140190722BB00D5F144 /* OVR_Sensor2Impl.h */; };
+ E8AA4189190722BB00D5F144 /* OVR_Sensor2ImplUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4141190722BB00D5F144 /* OVR_Sensor2ImplUtil.h */; };
+ E8AA418A190722BB00D5F144 /* OVR_SensorCalibration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4142190722BB00D5F144 /* OVR_SensorCalibration.cpp */; };
+ E8AA418B190722BB00D5F144 /* OVR_SensorCalibration.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4143190722BB00D5F144 /* OVR_SensorCalibration.h */; };
+ E8AA418C190722BB00D5F144 /* OVR_SensorFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4144190722BB00D5F144 /* OVR_SensorFilter.cpp */; };
+ E8AA418D190722BB00D5F144 /* OVR_SensorFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4145190722BB00D5F144 /* OVR_SensorFilter.h */; };
+ E8AA418E190722BB00D5F144 /* OVR_SensorFusion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4146190722BB00D5F144 /* OVR_SensorFusion.cpp */; };
+ E8AA418F190722BB00D5F144 /* OVR_SensorFusion.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4147190722BB00D5F144 /* OVR_SensorFusion.h */; };
+ E8AA4190190722BB00D5F144 /* OVR_SensorFusionDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4148190722BB00D5F144 /* OVR_SensorFusionDebug.h */; };
+ E8AA4191190722BB00D5F144 /* OVR_SensorImpl_Common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4149190722BB00D5F144 /* OVR_SensorImpl_Common.cpp */; };
+ E8AA4192190722BB00D5F144 /* OVR_SensorImpl_Common.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA414A190722BB00D5F144 /* OVR_SensorImpl_Common.h */; };
+ E8AA4193190722BB00D5F144 /* OVR_SensorImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA414B190722BB00D5F144 /* OVR_SensorImpl.cpp */; };
+ E8AA4194190722BB00D5F144 /* OVR_SensorImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA414C190722BB00D5F144 /* OVR_SensorImpl.h */; };
+ E8AA4195190722BB00D5F144 /* OVR_SensorTimeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA414D190722BB00D5F144 /* OVR_SensorTimeFilter.cpp */; };
+ E8AA4196190722BB00D5F144 /* OVR_SensorTimeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA414E190722BB00D5F144 /* OVR_SensorTimeFilter.h */; };
+ E8AA4197190722BB00D5F144 /* OVR_Stereo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA414F190722BB00D5F144 /* OVR_Stereo.cpp */; };
+ E8AA4198190722BB00D5F144 /* OVR_Stereo.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4150190722BB00D5F144 /* OVR_Stereo.h */; };
+ E8AA4199190722BB00D5F144 /* OVR_ThreadCommandQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA4151190722BB00D5F144 /* OVR_ThreadCommandQueue.cpp */; };
+ E8AA419A190722BB00D5F144 /* OVR_ThreadCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA4152190722BB00D5F144 /* OVR_ThreadCommandQueue.h */; };
+ E8AA41E2190724E600D5F144 /* CAPI_DistortionRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41BA190724E600D5F144 /* CAPI_DistortionRenderer.h */; };
+ E8AA41E3190724E600D5F144 /* CAPI_FrameTimeManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41BB190724E600D5F144 /* CAPI_FrameTimeManager.cpp */; };
+ E8AA41E4190724E600D5F144 /* CAPI_FrameTimeManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41BC190724E600D5F144 /* CAPI_FrameTimeManager.h */; };
+ E8AA41E5190724E600D5F144 /* CAPI_GlobalState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41BD190724E600D5F144 /* CAPI_GlobalState.cpp */; };
+ E8AA41E6190724E600D5F144 /* CAPI_GlobalState.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41BE190724E600D5F144 /* CAPI_GlobalState.h */; };
+ E8AA41E7190724E600D5F144 /* CAPI_HMDRenderState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41BF190724E600D5F144 /* CAPI_HMDRenderState.cpp */; };
+ E8AA41E8190724E600D5F144 /* CAPI_HMDRenderState.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41C0190724E600D5F144 /* CAPI_HMDRenderState.h */; };
+ E8AA41E9190724E600D5F144 /* CAPI_HMDState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41C1190724E600D5F144 /* CAPI_HMDState.cpp */; };
+ E8AA41EA190724E600D5F144 /* CAPI_HMDState.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41C2190724E600D5F144 /* CAPI_HMDState.h */; };
+ E8AA41F6190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41D0190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp */; };
+ E8AA41F7190724E600D5F144 /* CAPI_GL_DistortionRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41D1190724E600D5F144 /* CAPI_GL_DistortionRenderer.h */; };
+ E8AA41F8190724E600D5F144 /* CAPI_GL_Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8AA41D2190724E600D5F144 /* CAPI_GL_Util.cpp */; };
+ E8AA41F9190724E600D5F144 /* CAPI_GL_Util.h in Headers */ = {isa = PBXBuildFile; fileRef = E8AA41D3190724E600D5F144 /* CAPI_GL_Util.h */; };
+ E8F1F13E1921911D000EC969 /* OVR_Recording.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E8F1F13D1921911D000EC969 /* OVR_Recording.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ E82D4CD31906FE640070CB3F /* libovr.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libovr.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ E8754F7F190F1B71005FD401 /* OVR_Recording.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Recording.h; path = ../../../Src/OVR_Recording.h; sourceTree = "<group>"; };
+ E886FE9B190737FA00D5DB45 /* OVR_CAPI_GL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_CAPI_GL.h; path = ../../../Src/OVR_CAPI_GL.h; sourceTree = "<group>"; };
+ E886FE9C190737FA00D5DB45 /* OVR_CAPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_CAPI.cpp; path = ../../../Src/OVR_CAPI.cpp; sourceTree = "<group>"; };
+ E886FE9D190737FA00D5DB45 /* OVR_CAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_CAPI.h; path = ../../../Src/OVR_CAPI.h; sourceTree = "<group>"; };
+ E886FEA11907528C00D5DB45 /* CAPI_DistortionRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_DistortionRenderer.cpp; sourceTree = "<group>"; };
+ E8AA40A61907221900D5F144 /* OVR_Alg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Alg.cpp; sourceTree = "<group>"; };
+ E8AA40A71907221900D5F144 /* OVR_Alg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Alg.h; sourceTree = "<group>"; };
+ E8AA40A81907221900D5F144 /* OVR_Allocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Allocator.cpp; sourceTree = "<group>"; };
+ E8AA40A91907221900D5F144 /* OVR_Allocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Allocator.h; sourceTree = "<group>"; };
+ E8AA40AA1907221900D5F144 /* OVR_Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Array.h; sourceTree = "<group>"; };
+ E8AA40AB1907221900D5F144 /* OVR_Atomic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Atomic.cpp; sourceTree = "<group>"; };
+ E8AA40AC1907221900D5F144 /* OVR_Atomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Atomic.h; sourceTree = "<group>"; };
+ E8AA40AD1907221900D5F144 /* OVR_Color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Color.h; sourceTree = "<group>"; };
+ E8AA40AE1907221900D5F144 /* OVR_ContainerAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_ContainerAllocator.h; sourceTree = "<group>"; };
+ E8AA40AF1907221900D5F144 /* OVR_Deque.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Deque.h; sourceTree = "<group>"; };
+ E8AA40B01907221900D5F144 /* OVR_File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_File.cpp; sourceTree = "<group>"; };
+ E8AA40B11907221900D5F144 /* OVR_File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_File.h; sourceTree = "<group>"; };
+ E8AA40B21907221900D5F144 /* OVR_FileFILE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_FileFILE.cpp; sourceTree = "<group>"; };
+ E8AA40B31907221900D5F144 /* OVR_Hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Hash.h; sourceTree = "<group>"; };
+ E8AA40B41907221900D5F144 /* OVR_KeyCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_KeyCodes.h; sourceTree = "<group>"; };
+ E8AA40B51907221900D5F144 /* OVR_List.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_List.h; sourceTree = "<group>"; };
+ E8AA40B61907221900D5F144 /* OVR_Lockless.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Lockless.cpp; sourceTree = "<group>"; };
+ E8AA40B71907221900D5F144 /* OVR_Lockless.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Lockless.h; sourceTree = "<group>"; };
+ E8AA40B81907221900D5F144 /* OVR_Log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Log.cpp; sourceTree = "<group>"; };
+ E8AA40B91907221900D5F144 /* OVR_Log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Log.h; sourceTree = "<group>"; };
+ E8AA40BA1907221900D5F144 /* OVR_Math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Math.cpp; sourceTree = "<group>"; };
+ E8AA40BB1907221900D5F144 /* OVR_Math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Math.h; sourceTree = "<group>"; };
+ E8AA40BC1907221900D5F144 /* OVR_RefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_RefCount.cpp; sourceTree = "<group>"; };
+ E8AA40BD1907221900D5F144 /* OVR_RefCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_RefCount.h; sourceTree = "<group>"; };
+ E8AA40BE1907221900D5F144 /* OVR_Std.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Std.cpp; sourceTree = "<group>"; };
+ E8AA40BF1907221900D5F144 /* OVR_Std.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Std.h; sourceTree = "<group>"; };
+ E8AA40C01907221900D5F144 /* OVR_String.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_String.cpp; sourceTree = "<group>"; };
+ E8AA40C11907221900D5F144 /* OVR_String.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_String.h; sourceTree = "<group>"; };
+ E8AA40C21907221900D5F144 /* OVR_String_FormatUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_String_FormatUtil.cpp; sourceTree = "<group>"; };
+ E8AA40C31907221900D5F144 /* OVR_String_PathUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_String_PathUtil.cpp; sourceTree = "<group>"; };
+ E8AA40C41907221900D5F144 /* OVR_StringHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_StringHash.h; sourceTree = "<group>"; };
+ E8AA40C51907221900D5F144 /* OVR_SysFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_SysFile.cpp; sourceTree = "<group>"; };
+ E8AA40C61907221900D5F144 /* OVR_SysFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_SysFile.h; sourceTree = "<group>"; };
+ E8AA40C71907221900D5F144 /* OVR_System.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_System.cpp; sourceTree = "<group>"; };
+ E8AA40C81907221900D5F144 /* OVR_System.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_System.h; sourceTree = "<group>"; };
+ E8AA40C91907221900D5F144 /* OVR_Threads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Threads.h; sourceTree = "<group>"; };
+ E8AA40CA1907221900D5F144 /* OVR_ThreadsPthread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_ThreadsPthread.cpp; sourceTree = "<group>"; };
+ E8AA40CC1907221900D5F144 /* OVR_Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_Timer.cpp; sourceTree = "<group>"; };
+ E8AA40CD1907221900D5F144 /* OVR_Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Timer.h; sourceTree = "<group>"; };
+ E8AA40CE1907221900D5F144 /* OVR_Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_Types.h; sourceTree = "<group>"; };
+ E8AA40CF1907221900D5F144 /* OVR_UTF8Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OVR_UTF8Util.cpp; sourceTree = "<group>"; };
+ E8AA40D01907221900D5F144 /* OVR_UTF8Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OVR_UTF8Util.h; sourceTree = "<group>"; };
+ E8AA41011907224700D5F144 /* Util_Interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util_Interface.cpp; sourceTree = "<group>"; };
+ E8AA41021907224700D5F144 /* Util_Interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_Interface.h; sourceTree = "<group>"; };
+ E8AA41031907224700D5F144 /* Util_LatencyTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util_LatencyTest.cpp; sourceTree = "<group>"; };
+ E8AA41041907224700D5F144 /* Util_LatencyTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_LatencyTest.h; sourceTree = "<group>"; };
+ E8AA41051907224700D5F144 /* Util_LatencyTest2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util_LatencyTest2.cpp; sourceTree = "<group>"; };
+ E8AA41061907224700D5F144 /* Util_LatencyTest2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_LatencyTest2.h; sourceTree = "<group>"; };
+ E8AA41071907224700D5F144 /* Util_Render_Stereo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Util_Render_Stereo.cpp; sourceTree = "<group>"; };
+ E8AA41081907224700D5F144 /* Util_Render_Stereo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Util_Render_Stereo.h; sourceTree = "<group>"; };
+ E8AA4121190722BB00D5F144 /* OVR_Device.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Device.h; path = ../../../Src/OVR_Device.h; sourceTree = "<group>"; };
+ E8AA4122190722BB00D5F144 /* OVR_DeviceConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_DeviceConstants.h; path = ../../../Src/OVR_DeviceConstants.h; sourceTree = "<group>"; };
+ E8AA4123190722BB00D5F144 /* OVR_DeviceHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_DeviceHandle.cpp; path = ../../../Src/OVR_DeviceHandle.cpp; sourceTree = "<group>"; };
+ E8AA4124190722BB00D5F144 /* OVR_DeviceHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_DeviceHandle.h; path = ../../../Src/OVR_DeviceHandle.h; sourceTree = "<group>"; };
+ E8AA4125190722BB00D5F144 /* OVR_DeviceImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_DeviceImpl.cpp; path = ../../../Src/OVR_DeviceImpl.cpp; sourceTree = "<group>"; };
+ E8AA4126190722BB00D5F144 /* OVR_DeviceImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_DeviceImpl.h; path = ../../../Src/OVR_DeviceImpl.h; sourceTree = "<group>"; };
+ E8AA4127190722BB00D5F144 /* OVR_DeviceMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_DeviceMessages.h; path = ../../../Src/OVR_DeviceMessages.h; sourceTree = "<group>"; };
+ E8AA4128190722BB00D5F144 /* OVR_HIDDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_HIDDevice.h; path = ../../../Src/OVR_HIDDevice.h; sourceTree = "<group>"; };
+ E8AA4129190722BB00D5F144 /* OVR_HIDDeviceBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_HIDDeviceBase.h; path = ../../../Src/OVR_HIDDeviceBase.h; sourceTree = "<group>"; };
+ E8AA412A190722BB00D5F144 /* OVR_HIDDeviceImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_HIDDeviceImpl.h; path = ../../../Src/OVR_HIDDeviceImpl.h; sourceTree = "<group>"; };
+ E8AA412B190722BB00D5F144 /* OVR_JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_JSON.cpp; path = ../../../Src/OVR_JSON.cpp; sourceTree = "<group>"; };
+ E8AA412C190722BB00D5F144 /* OVR_JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_JSON.h; path = ../../../Src/OVR_JSON.h; sourceTree = "<group>"; };
+ E8AA412D190722BB00D5F144 /* OVR_LatencyTestImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_LatencyTestImpl.cpp; path = ../../../Src/OVR_LatencyTestImpl.cpp; sourceTree = "<group>"; };
+ E8AA412E190722BB00D5F144 /* OVR_LatencyTestImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_LatencyTestImpl.h; path = ../../../Src/OVR_LatencyTestImpl.h; sourceTree = "<group>"; };
+ E8AA4136190722BB00D5F144 /* OVR_OSX_DeviceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_OSX_DeviceManager.cpp; path = ../../../Src/OVR_OSX_DeviceManager.cpp; sourceTree = "<group>"; };
+ E8AA4137190722BB00D5F144 /* OVR_OSX_DeviceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_OSX_DeviceManager.h; path = ../../../Src/OVR_OSX_DeviceManager.h; sourceTree = "<group>"; };
+ E8AA4138190722BB00D5F144 /* OVR_OSX_HIDDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_OSX_HIDDevice.cpp; path = ../../../Src/OVR_OSX_HIDDevice.cpp; sourceTree = "<group>"; };
+ E8AA4139190722BB00D5F144 /* OVR_OSX_HIDDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_OSX_HIDDevice.h; path = ../../../Src/OVR_OSX_HIDDevice.h; sourceTree = "<group>"; };
+ E8AA413A190722BB00D5F144 /* OVR_OSX_HMDDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_OSX_HMDDevice.cpp; path = ../../../Src/OVR_OSX_HMDDevice.cpp; sourceTree = "<group>"; };
+ E8AA413B190722BB00D5F144 /* OVR_OSX_HMDDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_OSX_HMDDevice.h; path = ../../../Src/OVR_OSX_HMDDevice.h; sourceTree = "<group>"; };
+ E8AA413C190722BB00D5F144 /* OVR_OSX_SensorDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_OSX_SensorDevice.cpp; path = ../../../Src/OVR_OSX_SensorDevice.cpp; sourceTree = "<group>"; };
+ E8AA413D190722BB00D5F144 /* OVR_Profile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Profile.cpp; path = ../../../Src/OVR_Profile.cpp; sourceTree = "<group>"; };
+ E8AA413E190722BB00D5F144 /* OVR_Profile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Profile.h; path = ../../../Src/OVR_Profile.h; sourceTree = "<group>"; };
+ E8AA413F190722BB00D5F144 /* OVR_Sensor2Impl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Sensor2Impl.cpp; path = ../../../Src/OVR_Sensor2Impl.cpp; sourceTree = "<group>"; };
+ E8AA4140190722BB00D5F144 /* OVR_Sensor2Impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Sensor2Impl.h; path = ../../../Src/OVR_Sensor2Impl.h; sourceTree = "<group>"; };
+ E8AA4141190722BB00D5F144 /* OVR_Sensor2ImplUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Sensor2ImplUtil.h; path = ../../../Src/OVR_Sensor2ImplUtil.h; sourceTree = "<group>"; };
+ E8AA4142190722BB00D5F144 /* OVR_SensorCalibration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_SensorCalibration.cpp; path = ../../../Src/OVR_SensorCalibration.cpp; sourceTree = "<group>"; };
+ E8AA4143190722BB00D5F144 /* OVR_SensorCalibration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SensorCalibration.h; path = ../../../Src/OVR_SensorCalibration.h; sourceTree = "<group>"; };
+ E8AA4144190722BB00D5F144 /* OVR_SensorFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_SensorFilter.cpp; path = ../../../Src/OVR_SensorFilter.cpp; sourceTree = "<group>"; };
+ E8AA4145190722BB00D5F144 /* OVR_SensorFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SensorFilter.h; path = ../../../Src/OVR_SensorFilter.h; sourceTree = "<group>"; };
+ E8AA4146190722BB00D5F144 /* OVR_SensorFusion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_SensorFusion.cpp; path = ../../../Src/OVR_SensorFusion.cpp; sourceTree = "<group>"; };
+ E8AA4147190722BB00D5F144 /* OVR_SensorFusion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SensorFusion.h; path = ../../../Src/OVR_SensorFusion.h; sourceTree = "<group>"; };
+ E8AA4148190722BB00D5F144 /* OVR_SensorFusionDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SensorFusionDebug.h; path = ../../../Src/OVR_SensorFusionDebug.h; sourceTree = "<group>"; };
+ E8AA4149190722BB00D5F144 /* OVR_SensorImpl_Common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_SensorImpl_Common.cpp; path = ../../../Src/OVR_SensorImpl_Common.cpp; sourceTree = "<group>"; };
+ E8AA414A190722BB00D5F144 /* OVR_SensorImpl_Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SensorImpl_Common.h; path = ../../../Src/OVR_SensorImpl_Common.h; sourceTree = "<group>"; };
+ E8AA414B190722BB00D5F144 /* OVR_SensorImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_SensorImpl.cpp; path = ../../../Src/OVR_SensorImpl.cpp; sourceTree = "<group>"; };
+ E8AA414C190722BB00D5F144 /* OVR_SensorImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SensorImpl.h; path = ../../../Src/OVR_SensorImpl.h; sourceTree = "<group>"; };
+ E8AA414D190722BB00D5F144 /* OVR_SensorTimeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_SensorTimeFilter.cpp; path = ../../../Src/OVR_SensorTimeFilter.cpp; sourceTree = "<group>"; };
+ E8AA414E190722BB00D5F144 /* OVR_SensorTimeFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_SensorTimeFilter.h; path = ../../../Src/OVR_SensorTimeFilter.h; sourceTree = "<group>"; };
+ E8AA414F190722BB00D5F144 /* OVR_Stereo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Stereo.cpp; path = ../../../Src/OVR_Stereo.cpp; sourceTree = "<group>"; };
+ E8AA4150190722BB00D5F144 /* OVR_Stereo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_Stereo.h; path = ../../../Src/OVR_Stereo.h; sourceTree = "<group>"; };
+ E8AA4151190722BB00D5F144 /* OVR_ThreadCommandQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_ThreadCommandQueue.cpp; path = ../../../Src/OVR_ThreadCommandQueue.cpp; sourceTree = "<group>"; };
+ E8AA4152190722BB00D5F144 /* OVR_ThreadCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OVR_ThreadCommandQueue.h; path = ../../../Src/OVR_ThreadCommandQueue.h; sourceTree = "<group>"; };
+ E8AA41BA190724E600D5F144 /* CAPI_DistortionRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_DistortionRenderer.h; sourceTree = "<group>"; };
+ E8AA41BB190724E600D5F144 /* CAPI_FrameTimeManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_FrameTimeManager.cpp; sourceTree = "<group>"; };
+ E8AA41BC190724E600D5F144 /* CAPI_FrameTimeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_FrameTimeManager.h; sourceTree = "<group>"; };
+ E8AA41BD190724E600D5F144 /* CAPI_GlobalState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_GlobalState.cpp; sourceTree = "<group>"; };
+ E8AA41BE190724E600D5F144 /* CAPI_GlobalState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_GlobalState.h; sourceTree = "<group>"; };
+ E8AA41BF190724E600D5F144 /* CAPI_HMDRenderState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_HMDRenderState.cpp; sourceTree = "<group>"; };
+ E8AA41C0190724E600D5F144 /* CAPI_HMDRenderState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_HMDRenderState.h; sourceTree = "<group>"; };
+ E8AA41C1190724E600D5F144 /* CAPI_HMDState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_HMDState.cpp; sourceTree = "<group>"; };
+ E8AA41C2190724E600D5F144 /* CAPI_HMDState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_HMDState.h; sourceTree = "<group>"; };
+ E8AA41D0190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_GL_DistortionRenderer.cpp; sourceTree = "<group>"; };
+ E8AA41D1190724E600D5F144 /* CAPI_GL_DistortionRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_GL_DistortionRenderer.h; sourceTree = "<group>"; };
+ E8AA41D2190724E600D5F144 /* CAPI_GL_Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPI_GL_Util.cpp; sourceTree = "<group>"; };
+ E8AA41D3190724E600D5F144 /* CAPI_GL_Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPI_GL_Util.h; sourceTree = "<group>"; };
+ E8F1F13D1921911D000EC969 /* OVR_Recording.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OVR_Recording.cpp; path = ../../../Src/OVR_Recording.cpp; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ E82D4CD01906FE640070CB3F /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ E82D4CCA1906FE640070CB3F = {
+ isa = PBXGroup;
+ children = (
+ E8AA41B8190724E600D5F144 /* CAPI */,
+ E8AA40A51907221900D5F144 /* Kernel */,
+ E8AA40FC1907224700D5F144 /* Util */,
+ E886FE9B190737FA00D5DB45 /* OVR_CAPI_GL.h */,
+ E886FE9C190737FA00D5DB45 /* OVR_CAPI.cpp */,
+ E886FE9D190737FA00D5DB45 /* OVR_CAPI.h */,
+ E8AA4121190722BB00D5F144 /* OVR_Device.h */,
+ E8AA4122190722BB00D5F144 /* OVR_DeviceConstants.h */,
+ E8AA4123190722BB00D5F144 /* OVR_DeviceHandle.cpp */,
+ E8AA4124190722BB00D5F144 /* OVR_DeviceHandle.h */,
+ E8AA4125190722BB00D5F144 /* OVR_DeviceImpl.cpp */,
+ E8AA4126190722BB00D5F144 /* OVR_DeviceImpl.h */,
+ E8AA4127190722BB00D5F144 /* OVR_DeviceMessages.h */,
+ E8AA4128190722BB00D5F144 /* OVR_HIDDevice.h */,
+ E8AA4129190722BB00D5F144 /* OVR_HIDDeviceBase.h */,
+ E8AA412A190722BB00D5F144 /* OVR_HIDDeviceImpl.h */,
+ E8AA412B190722BB00D5F144 /* OVR_JSON.cpp */,
+ E8AA412C190722BB00D5F144 /* OVR_JSON.h */,
+ E8AA412D190722BB00D5F144 /* OVR_LatencyTestImpl.cpp */,
+ E8AA412E190722BB00D5F144 /* OVR_LatencyTestImpl.h */,
+ E8AA4136190722BB00D5F144 /* OVR_OSX_DeviceManager.cpp */,
+ E8AA4137190722BB00D5F144 /* OVR_OSX_DeviceManager.h */,
+ E8AA4138190722BB00D5F144 /* OVR_OSX_HIDDevice.cpp */,
+ E8AA4139190722BB00D5F144 /* OVR_OSX_HIDDevice.h */,
+ E8AA413A190722BB00D5F144 /* OVR_OSX_HMDDevice.cpp */,
+ E8AA413B190722BB00D5F144 /* OVR_OSX_HMDDevice.h */,
+ E8AA413C190722BB00D5F144 /* OVR_OSX_SensorDevice.cpp */,
+ E8AA413D190722BB00D5F144 /* OVR_Profile.cpp */,
+ E8AA413E190722BB00D5F144 /* OVR_Profile.h */,
+ E8F1F13D1921911D000EC969 /* OVR_Recording.cpp */,
+ E8754F7F190F1B71005FD401 /* OVR_Recording.h */,
+ E8AA413F190722BB00D5F144 /* OVR_Sensor2Impl.cpp */,
+ E8AA4140190722BB00D5F144 /* OVR_Sensor2Impl.h */,
+ E8AA4141190722BB00D5F144 /* OVR_Sensor2ImplUtil.h */,
+ E8AA4142190722BB00D5F144 /* OVR_SensorCalibration.cpp */,
+ E8AA4143190722BB00D5F144 /* OVR_SensorCalibration.h */,
+ E8AA4144190722BB00D5F144 /* OVR_SensorFilter.cpp */,
+ E8AA4145190722BB00D5F144 /* OVR_SensorFilter.h */,
+ E8AA4146190722BB00D5F144 /* OVR_SensorFusion.cpp */,
+ E8AA4147190722BB00D5F144 /* OVR_SensorFusion.h */,
+ E8AA4148190722BB00D5F144 /* OVR_SensorFusionDebug.h */,
+ E8AA4149190722BB00D5F144 /* OVR_SensorImpl_Common.cpp */,
+ E8AA414A190722BB00D5F144 /* OVR_SensorImpl_Common.h */,
+ E8AA414B190722BB00D5F144 /* OVR_SensorImpl.cpp */,
+ E8AA414C190722BB00D5F144 /* OVR_SensorImpl.h */,
+ E8AA414D190722BB00D5F144 /* OVR_SensorTimeFilter.cpp */,
+ E8AA414E190722BB00D5F144 /* OVR_SensorTimeFilter.h */,
+ E8AA414F190722BB00D5F144 /* OVR_Stereo.cpp */,
+ E8AA4150190722BB00D5F144 /* OVR_Stereo.h */,
+ E8AA4151190722BB00D5F144 /* OVR_ThreadCommandQueue.cpp */,
+ E8AA4152190722BB00D5F144 /* OVR_ThreadCommandQueue.h */,
+ E82D4CD41906FE640070CB3F /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ E82D4CD41906FE640070CB3F /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ E82D4CD31906FE640070CB3F /* libovr.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ E8AA40A51907221900D5F144 /* Kernel */ = {
+ isa = PBXGroup;
+ children = (
+ E8AA40A61907221900D5F144 /* OVR_Alg.cpp */,
+ E8AA40A71907221900D5F144 /* OVR_Alg.h */,
+ E8AA40A81907221900D5F144 /* OVR_Allocator.cpp */,
+ E8AA40A91907221900D5F144 /* OVR_Allocator.h */,
+ E8AA40AA1907221900D5F144 /* OVR_Array.h */,
+ E8AA40AB1907221900D5F144 /* OVR_Atomic.cpp */,
+ E8AA40AC1907221900D5F144 /* OVR_Atomic.h */,
+ E8AA40AD1907221900D5F144 /* OVR_Color.h */,
+ E8AA40AE1907221900D5F144 /* OVR_ContainerAllocator.h */,
+ E8AA40AF1907221900D5F144 /* OVR_Deque.h */,
+ E8AA40B01907221900D5F144 /* OVR_File.cpp */,
+ E8AA40B11907221900D5F144 /* OVR_File.h */,
+ E8AA40B21907221900D5F144 /* OVR_FileFILE.cpp */,
+ E8AA40B31907221900D5F144 /* OVR_Hash.h */,
+ E8AA40B41907221900D5F144 /* OVR_KeyCodes.h */,
+ E8AA40B51907221900D5F144 /* OVR_List.h */,
+ E8AA40B61907221900D5F144 /* OVR_Lockless.cpp */,
+ E8AA40B71907221900D5F144 /* OVR_Lockless.h */,
+ E8AA40B81907221900D5F144 /* OVR_Log.cpp */,
+ E8AA40B91907221900D5F144 /* OVR_Log.h */,
+ E8AA40BA1907221900D5F144 /* OVR_Math.cpp */,
+ E8AA40BB1907221900D5F144 /* OVR_Math.h */,
+ E8AA40BC1907221900D5F144 /* OVR_RefCount.cpp */,
+ E8AA40BD1907221900D5F144 /* OVR_RefCount.h */,
+ E8AA40BE1907221900D5F144 /* OVR_Std.cpp */,
+ E8AA40BF1907221900D5F144 /* OVR_Std.h */,
+ E8AA40C01907221900D5F144 /* OVR_String.cpp */,
+ E8AA40C11907221900D5F144 /* OVR_String.h */,
+ E8AA40C21907221900D5F144 /* OVR_String_FormatUtil.cpp */,
+ E8AA40C31907221900D5F144 /* OVR_String_PathUtil.cpp */,
+ E8AA40C41907221900D5F144 /* OVR_StringHash.h */,
+ E8AA40C51907221900D5F144 /* OVR_SysFile.cpp */,
+ E8AA40C61907221900D5F144 /* OVR_SysFile.h */,
+ E8AA40C71907221900D5F144 /* OVR_System.cpp */,
+ E8AA40C81907221900D5F144 /* OVR_System.h */,
+ E8AA40C91907221900D5F144 /* OVR_Threads.h */,
+ E8AA40CA1907221900D5F144 /* OVR_ThreadsPthread.cpp */,
+ E8AA40CC1907221900D5F144 /* OVR_Timer.cpp */,
+ E8AA40CD1907221900D5F144 /* OVR_Timer.h */,
+ E8AA40CE1907221900D5F144 /* OVR_Types.h */,
+ E8AA40CF1907221900D5F144 /* OVR_UTF8Util.cpp */,
+ E8AA40D01907221900D5F144 /* OVR_UTF8Util.h */,
+ );
+ name = Kernel;
+ path = ../../../Src/Kernel;
+ sourceTree = "<group>";
+ };
+ E8AA40FC1907224700D5F144 /* Util */ = {
+ isa = PBXGroup;
+ children = (
+ E8AA41011907224700D5F144 /* Util_Interface.cpp */,
+ E8AA41021907224700D5F144 /* Util_Interface.h */,
+ E8AA41031907224700D5F144 /* Util_LatencyTest.cpp */,
+ E8AA41041907224700D5F144 /* Util_LatencyTest.h */,
+ E8AA41051907224700D5F144 /* Util_LatencyTest2.cpp */,
+ E8AA41061907224700D5F144 /* Util_LatencyTest2.h */,
+ E8AA41071907224700D5F144 /* Util_Render_Stereo.cpp */,
+ E8AA41081907224700D5F144 /* Util_Render_Stereo.h */,
+ );
+ name = Util;
+ path = ../../../Src/Util;
+ sourceTree = "<group>";
+ };
+ E8AA41B8190724E600D5F144 /* CAPI */ = {
+ isa = PBXGroup;
+ children = (
+ E886FEA11907528C00D5DB45 /* CAPI_DistortionRenderer.cpp */,
+ E8AA41BA190724E600D5F144 /* CAPI_DistortionRenderer.h */,
+ E8AA41BB190724E600D5F144 /* CAPI_FrameTimeManager.cpp */,
+ E8AA41BC190724E600D5F144 /* CAPI_FrameTimeManager.h */,
+ E8AA41BD190724E600D5F144 /* CAPI_GlobalState.cpp */,
+ E8AA41BE190724E600D5F144 /* CAPI_GlobalState.h */,
+ E8AA41BF190724E600D5F144 /* CAPI_HMDRenderState.cpp */,
+ E8AA41C0190724E600D5F144 /* CAPI_HMDRenderState.h */,
+ E8AA41C1190724E600D5F144 /* CAPI_HMDState.cpp */,
+ E8AA41C2190724E600D5F144 /* CAPI_HMDState.h */,
+ E8AA41CF190724E600D5F144 /* GL */,
+ );
+ name = CAPI;
+ path = ../../../Src/CAPI;
+ sourceTree = "<group>";
+ };
+ E8AA41CF190724E600D5F144 /* GL */ = {
+ isa = PBXGroup;
+ children = (
+ E8AA41D0190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp */,
+ E8AA41D1190724E600D5F144 /* CAPI_GL_DistortionRenderer.h */,
+ E8AA41D2190724E600D5F144 /* CAPI_GL_Util.cpp */,
+ E8AA41D3190724E600D5F144 /* CAPI_GL_Util.h */,
+ );
+ path = GL;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ E82D4CD11906FE640070CB3F /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E8AA4198190722BB00D5F144 /* OVR_Stereo.h in Headers */,
+ E8AA41E2190724E600D5F144 /* CAPI_DistortionRenderer.h in Headers */,
+ E8AA41101907224700D5F144 /* Util_LatencyTest.h in Headers */,
+ E8AA40DF1907221900D5F144 /* OVR_KeyCodes.h in Headers */,
+ E8AA40D51907221900D5F144 /* OVR_Array.h in Headers */,
+ E8AA41F7190724E600D5F144 /* CAPI_GL_DistortionRenderer.h in Headers */,
+ E8AA416F190722BB00D5F144 /* OVR_DeviceMessages.h in Headers */,
+ E8AA40DC1907221900D5F144 /* OVR_File.h in Headers */,
+ E8AA40D41907221900D5F144 /* OVR_Allocator.h in Headers */,
+ E8AA410E1907224700D5F144 /* Util_Interface.h in Headers */,
+ E8AA418B190722BB00D5F144 /* OVR_SensorCalibration.h in Headers */,
+ E886FEA0190737FA00D5DB45 /* OVR_CAPI.h in Headers */,
+ E8AA417F190722BB00D5F144 /* OVR_OSX_DeviceManager.h in Headers */,
+ E8AA4170190722BB00D5F144 /* OVR_HIDDevice.h in Headers */,
+ E8AA419A190722BB00D5F144 /* OVR_ThreadCommandQueue.h in Headers */,
+ E8AA41F9190724E600D5F144 /* CAPI_GL_Util.h in Headers */,
+ E8AA40E21907221900D5F144 /* OVR_Lockless.h in Headers */,
+ E8AA40F31907221900D5F144 /* OVR_System.h in Headers */,
+ E8AA41E8190724E600D5F144 /* CAPI_HMDRenderState.h in Headers */,
+ E8AA41141907224700D5F144 /* Util_Render_Stereo.h in Headers */,
+ E8AA40E61907221900D5F144 /* OVR_Math.h in Headers */,
+ E8AA418D190722BB00D5F144 /* OVR_SensorFilter.h in Headers */,
+ E8AA40F91907221900D5F144 /* OVR_Types.h in Headers */,
+ E8AA40D91907221900D5F144 /* OVR_ContainerAllocator.h in Headers */,
+ E8754F81190F1B71005FD401 /* OVR_Recording.h in Headers */,
+ E8AA40D71907221900D5F144 /* OVR_Atomic.h in Headers */,
+ E8AA41E4190724E600D5F144 /* CAPI_FrameTimeManager.h in Headers */,
+ E8AA41E6190724E600D5F144 /* CAPI_GlobalState.h in Headers */,
+ E8AA416E190722BB00D5F144 /* OVR_DeviceImpl.h in Headers */,
+ E8AA40D21907221900D5F144 /* OVR_Alg.h in Headers */,
+ E8AA40E01907221900D5F144 /* OVR_List.h in Headers */,
+ E8AA4194190722BB00D5F144 /* OVR_SensorImpl.h in Headers */,
+ E8AA40EF1907221900D5F144 /* OVR_StringHash.h in Headers */,
+ E886FE9E190737FA00D5DB45 /* OVR_CAPI_GL.h in Headers */,
+ E8AA41EA190724E600D5F144 /* CAPI_HMDState.h in Headers */,
+ E8AA40D81907221900D5F144 /* OVR_Color.h in Headers */,
+ E8AA4172190722BB00D5F144 /* OVR_HIDDeviceImpl.h in Headers */,
+ E8AA416C190722BB00D5F144 /* OVR_DeviceHandle.h in Headers */,
+ E8AA4196190722BB00D5F144 /* OVR_SensorTimeFilter.h in Headers */,
+ E8AA418F190722BB00D5F144 /* OVR_SensorFusion.h in Headers */,
+ E8AA4181190722BB00D5F144 /* OVR_OSX_HIDDevice.h in Headers */,
+ E8AA4174190722BB00D5F144 /* OVR_JSON.h in Headers */,
+ E8AA4183190722BB00D5F144 /* OVR_OSX_HMDDevice.h in Headers */,
+ E8AA4171190722BB00D5F144 /* OVR_HIDDeviceBase.h in Headers */,
+ E8AA4190190722BB00D5F144 /* OVR_SensorFusionDebug.h in Headers */,
+ E8AA4176190722BB00D5F144 /* OVR_LatencyTestImpl.h in Headers */,
+ E8AA40F11907221900D5F144 /* OVR_SysFile.h in Headers */,
+ E8AA40DE1907221900D5F144 /* OVR_Hash.h in Headers */,
+ E8AA4189190722BB00D5F144 /* OVR_Sensor2ImplUtil.h in Headers */,
+ E8AA40EC1907221900D5F144 /* OVR_String.h in Headers */,
+ E8AA4169190722BB00D5F144 /* OVR_Device.h in Headers */,
+ E8AA4186190722BB00D5F144 /* OVR_Profile.h in Headers */,
+ E8AA4188190722BB00D5F144 /* OVR_Sensor2Impl.h in Headers */,
+ E8AA40EA1907221900D5F144 /* OVR_Std.h in Headers */,
+ E8AA41121907224700D5F144 /* Util_LatencyTest2.h in Headers */,
+ E8AA40E81907221900D5F144 /* OVR_RefCount.h in Headers */,
+ E8AA40DA1907221900D5F144 /* OVR_Deque.h in Headers */,
+ E8AA416A190722BB00D5F144 /* OVR_DeviceConstants.h in Headers */,
+ E8AA40FB1907221900D5F144 /* OVR_UTF8Util.h in Headers */,
+ E8AA4192190722BB00D5F144 /* OVR_SensorImpl_Common.h in Headers */,
+ E8AA40F41907221900D5F144 /* OVR_Threads.h in Headers */,
+ E8AA40F81907221900D5F144 /* OVR_Timer.h in Headers */,
+ E8AA40E41907221900D5F144 /* OVR_Log.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ E82D4CD21906FE640070CB3F /* LibOVR */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = E82D4CD71906FE640070CB3F /* Build configuration list for PBXNativeTarget "LibOVR" */;
+ buildPhases = (
+ E82D4CCF1906FE640070CB3F /* Sources */,
+ E82D4CD01906FE640070CB3F /* Frameworks */,
+ E82D4CD11906FE640070CB3F /* Headers */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = LibOVR;
+ productName = LibOVR;
+ productReference = E82D4CD31906FE640070CB3F /* libovr.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ E82D4CCB1906FE640070CB3F /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0510;
+ ORGANIZATIONNAME = "Oculus VR Inc.";
+ };
+ buildConfigurationList = E82D4CCE1906FE640070CB3F /* Build configuration list for PBXProject "LibOVR" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = E82D4CCA1906FE640070CB3F;
+ productRefGroup = E82D4CD41906FE640070CB3F /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ E82D4CD21906FE640070CB3F /* LibOVR */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ E82D4CCF1906FE640070CB3F /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E8AA4175190722BB00D5F144 /* OVR_LatencyTestImpl.cpp in Sources */,
+ E8AA41E3190724E600D5F144 /* CAPI_FrameTimeManager.cpp in Sources */,
+ E8AA4199190722BB00D5F144 /* OVR_ThreadCommandQueue.cpp in Sources */,
+ E8AA417E190722BB00D5F144 /* OVR_OSX_DeviceManager.cpp in Sources */,
+ E8AA41131907224700D5F144 /* Util_Render_Stereo.cpp in Sources */,
+ E8AA4182190722BB00D5F144 /* OVR_OSX_HMDDevice.cpp in Sources */,
+ E8AA4185190722BB00D5F144 /* OVR_Profile.cpp in Sources */,
+ E8AA40F01907221900D5F144 /* OVR_SysFile.cpp in Sources */,
+ E8AA40DB1907221900D5F144 /* OVR_File.cpp in Sources */,
+ E8AA40ED1907221900D5F144 /* OVR_String_FormatUtil.cpp in Sources */,
+ E8F1F13E1921911D000EC969 /* OVR_Recording.cpp in Sources */,
+ E8AA41111907224700D5F144 /* Util_LatencyTest2.cpp in Sources */,
+ E8AA4173190722BB00D5F144 /* OVR_JSON.cpp in Sources */,
+ E8AA40D61907221900D5F144 /* OVR_Atomic.cpp in Sources */,
+ E8AA40E31907221900D5F144 /* OVR_Log.cpp in Sources */,
+ E8AA40E91907221900D5F144 /* OVR_Std.cpp in Sources */,
+ E8AA4193190722BB00D5F144 /* OVR_SensorImpl.cpp in Sources */,
+ E8AA41F6190724E600D5F144 /* CAPI_GL_DistortionRenderer.cpp in Sources */,
+ E8AA40DD1907221900D5F144 /* OVR_FileFILE.cpp in Sources */,
+ E8AA410F1907224700D5F144 /* Util_LatencyTest.cpp in Sources */,
+ E8AA40E51907221900D5F144 /* OVR_Math.cpp in Sources */,
+ E8AA4180190722BB00D5F144 /* OVR_OSX_HIDDevice.cpp in Sources */,
+ E8AA40D31907221900D5F144 /* OVR_Allocator.cpp in Sources */,
+ E8AA41E9190724E600D5F144 /* CAPI_HMDState.cpp in Sources */,
+ E8AA40FA1907221900D5F144 /* OVR_UTF8Util.cpp in Sources */,
+ E8AA410D1907224700D5F144 /* Util_Interface.cpp in Sources */,
+ E8AA40F71907221900D5F144 /* OVR_Timer.cpp in Sources */,
+ E8AA40D11907221900D5F144 /* OVR_Alg.cpp in Sources */,
+ E8AA4197190722BB00D5F144 /* OVR_Stereo.cpp in Sources */,
+ E8AA40F21907221900D5F144 /* OVR_System.cpp in Sources */,
+ E8AA40EB1907221900D5F144 /* OVR_String.cpp in Sources */,
+ E8AA416B190722BB00D5F144 /* OVR_DeviceHandle.cpp in Sources */,
+ E8AA418C190722BB00D5F144 /* OVR_SensorFilter.cpp in Sources */,
+ E886FE9F190737FA00D5DB45 /* OVR_CAPI.cpp in Sources */,
+ E8AA40E71907221900D5F144 /* OVR_RefCount.cpp in Sources */,
+ E8AA416D190722BB00D5F144 /* OVR_DeviceImpl.cpp in Sources */,
+ E8AA41E5190724E600D5F144 /* CAPI_GlobalState.cpp in Sources */,
+ E8AA418A190722BB00D5F144 /* OVR_SensorCalibration.cpp in Sources */,
+ E8AA418E190722BB00D5F144 /* OVR_SensorFusion.cpp in Sources */,
+ E8AA4184190722BB00D5F144 /* OVR_OSX_SensorDevice.cpp in Sources */,
+ E8AA40E11907221900D5F144 /* OVR_Lockless.cpp in Sources */,
+ E8AA41E7190724E600D5F144 /* CAPI_HMDRenderState.cpp in Sources */,
+ E8AA4187190722BB00D5F144 /* OVR_Sensor2Impl.cpp in Sources */,
+ E8AA41F8190724E600D5F144 /* CAPI_GL_Util.cpp in Sources */,
+ E8AA4191190722BB00D5F144 /* OVR_SensorImpl_Common.cpp in Sources */,
+ E8AA40EE1907221900D5F144 /* OVR_String_PathUtil.cpp in Sources */,
+ E8AA4195190722BB00D5F144 /* OVR_SensorTimeFilter.cpp in Sources */,
+ E886FEA21907528C00D5DB45 /* CAPI_DistortionRenderer.cpp in Sources */,
+ E8AA40F51907221900D5F144 /* OVR_ThreadsPthread.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ E82D4CD51906FE640070CB3F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ };
+ name = Debug;
+ };
+ E82D4CD61906FE640070CB3F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = NO;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ SDKROOT = macosx;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ };
+ name = Release;
+ };
+ E82D4CD81906FE640070CB3F /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ EXECUTABLE_PREFIX = "";
+ GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ OVR_BUILD_DEBUG,
+ "$(inherited)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_NAME = libovr;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ };
+ name = Debug;
+ };
+ E82D4CD91906FE640070CB3F /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ EXECUTABLE_PREFIX = "";
+ GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ OBJROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ ONLY_ACTIVE_ARCH = NO;
+ PRODUCT_NAME = libovr;
+ SYMROOT = "$(SRCROOT)/../../../Lib/Mac/Xcode/$(CONFIGURATION)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ E82D4CCE1906FE640070CB3F /* Build configuration list for PBXProject "LibOVR" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E82D4CD51906FE640070CB3F /* Debug */,
+ E82D4CD61906FE640070CB3F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ E82D4CD71906FE640070CB3F /* Build configuration list for PBXNativeTarget "LibOVR" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E82D4CD81906FE640070CB3F /* Debug */,
+ E82D4CD91906FE640070CB3F /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = E82D4CCB1906FE640070CB3F /* Project object */;
+}
diff --git a/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..6e21728
--- /dev/null
+++ b/LibOVR/Projects/Mac/Xcode/LibOVR.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:LibOVR.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/LibOVR/Src/OVR_OSX_DeviceManager.cpp b/LibOVR/Src/OVR_OSX_DeviceManager.cpp
new file mode 100644
index 0000000..078936a
--- /dev/null
+++ b/LibOVR/Src/OVR_OSX_DeviceManager.cpp
@@ -0,0 +1,360 @@
+/************************************************************************************
+
+Filename : OVR_OSX_DeviceManager.cpp
+Content : OSX specific DeviceManager implementation.
+Created : March 14, 2013
+Authors : Lee Cooper
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#include "OVR_OSX_DeviceManager.h"
+
+// Sensor & HMD Factories
+#include "OVR_LatencyTestImpl.h"
+#include "OVR_SensorImpl.h"
+#include "OVR_OSX_HMDDevice.h"
+#include "OVR_OSX_HIDDevice.h"
+
+#include "Kernel/OVR_Timer.h"
+#include "Kernel/OVR_Std.h"
+#include "Kernel/OVR_Log.h"
+
+#include <IOKit/hid/IOHIDManager.h>
+#include <IOKit/hid/IOHIDKeys.h>
+
+
+namespace OVR { namespace OSX {
+
+//-------------------------------------------------------------------------------------
+// **** OSX::DeviceManager
+
+DeviceManager::DeviceManager()
+{
+}
+
+DeviceManager::~DeviceManager()
+{
+ OVR_DEBUG_LOG(("OSX::DeviceManager::~DeviceManager was called"));
+}
+
+bool DeviceManager::Initialize(DeviceBase*)
+{
+ if (!DeviceManagerImpl::Initialize(0))
+ return false;
+
+ // Start the background thread.
+ pThread = *new DeviceManagerThread();
+ if (!pThread || !pThread->Start())
+ return false;
+
+ // Wait for the thread to be fully up and running.
+ pThread->StartupEvent.Wait();
+
+ // Do this now that we know the thread's run loop.
+ HidDeviceManager = *HIDDeviceManager::CreateInternal(this);
+
+ CGDisplayRegisterReconfigurationCallback(displayReconfigurationCallBack, this);
+
+ pCreateDesc->pDevice = this;
+ LogText("OVR::DeviceManager - initialized.\n");
+
+ return true;
+}
+
+void DeviceManager::Shutdown()
+{
+ LogText("OVR::DeviceManager - shutting down.\n");
+
+ CGDisplayRemoveReconfigurationCallback(displayReconfigurationCallBack, this);
+
+ // Set Manager shutdown marker variable; this prevents
+ // any existing DeviceHandle objects from accessing device.
+ pCreateDesc->pLock->pManager = 0;
+
+ // Push for thread shutdown *WITH NO WAIT*.
+ // This will have the following effect:
+ // - Exit command will get enqueued, which will be executed later on the thread itself.
+ // - Beyond this point, this DeviceManager object may be deleted by our caller.
+ // - Other commands, such as CreateDevice, may execute before ExitCommand, but they will
+ // fail gracefully due to pLock->pManager == 0. Future commands can't be enqued
+ // after pManager is null.
+ // - Once ExitCommand executes, ThreadCommand::Run loop will exit and release the last
+ // reference to the thread object.
+ pThread->Shutdown();
+ pThread.Clear();
+
+ DeviceManagerImpl::Shutdown();
+}
+
+ThreadCommandQueue* DeviceManager::GetThreadQueue()
+{
+ return pThread;
+}
+
+ThreadId DeviceManager::GetThreadId() const
+{
+ return pThread->GetThreadId();
+}
+
+bool DeviceManager::GetDeviceInfo(DeviceInfo* info) const
+{
+ if ((info->InfoClassType != Device_Manager) &&
+ (info->InfoClassType != Device_None))
+ return false;
+
+ info->Type = Device_Manager;
+ info->Version = 0;
+ info->ProductName = "DeviceManager";
+ info->Manufacturer = "Oculus VR, Inc.";
+ return true;
+}
+
+DeviceEnumerator<> DeviceManager::EnumerateDevicesEx(const DeviceEnumerationArgs& args)
+{
+ // TBD: Can this be avoided in the future, once proper device notification is in place?
+ pThread->PushCall((DeviceManagerImpl*)this,
+ &DeviceManager::EnumerateAllFactoryDevices, true);
+
+ return DeviceManagerImpl::EnumerateDevicesEx(args);
+}
+
+void DeviceManager::displayReconfigurationCallBack (CGDirectDisplayID display,
+ CGDisplayChangeSummaryFlags flags,
+ void *userInfo)
+{
+ DeviceManager* manager = reinterpret_cast<DeviceManager*>(userInfo);
+ OVR_UNUSED(manager);
+
+ if (flags & kCGDisplayAddFlag)
+ {
+ LogText("Display Added, id = %d\n", int(display));
+ manager->EnumerateDevices<HMDDevice>();
+ }
+ else if (flags & kCGDisplayRemoveFlag)
+ {
+ LogText("Display Removed, id = %d\n", int(display));
+ manager->EnumerateDevices<HMDDevice>();
+ }
+}
+
+//-------------------------------------------------------------------------------------
+// ***** DeviceManager Thread
+
+DeviceManagerThread::DeviceManagerThread()
+ : Thread(ThreadStackSize)
+{
+}
+
+DeviceManagerThread::~DeviceManagerThread()
+{
+}
+
+int DeviceManagerThread::Run()
+{
+
+ SetThreadName("OVR::DeviceManagerThread");
+ LogText("OVR::DeviceManagerThread - running (ThreadId=0x%p).\n", GetThreadId());
+
+ // Store out the run loop ref.
+ RunLoop = CFRunLoopGetCurrent();
+
+ // Create a 'source' to enable us to signal the run loop to process the command queue.
+ CFRunLoopSourceContext sourceContext;
+ memset(&sourceContext, 0, sizeof(sourceContext));
+ sourceContext.version = 0;
+ sourceContext.info = this;
+ sourceContext.perform = &staticCommandQueueSourceCallback;
+
+ CommandQueueSource = CFRunLoopSourceCreate(kCFAllocatorDefault, 0 , &sourceContext);
+
+ CFRunLoopAddSource(RunLoop, CommandQueueSource, kCFRunLoopDefaultMode);
+
+
+ // Signal to the parent thread that initialization has finished.
+ StartupEvent.SetEvent();
+
+
+ ThreadCommand::PopBuffer command;
+
+ while(!IsExiting())
+ {
+ // PopCommand will reset event on empty queue.
+ if (PopCommand(&command))
+ {
+ command.Execute();
+ }
+ else
+ {
+ SInt32 exitReason = 0;
+ do {
+
+ UInt32 waitMs = INT_MAX;
+
+ // If devices have time-dependent logic registered, get the longest wait
+ // allowed based on current ticks.
+ if (!TicksNotifiers.IsEmpty())
+ {
+ double timeSeconds = Timer::GetSeconds();
+ unsigned waitAllowed;
+
+ for (UPInt j = 0; j < TicksNotifiers.GetSize(); j++)
+ {
+ waitAllowed = (unsigned)(TicksNotifiers[j]->OnTicks(timeSeconds) * Timer::MsPerSecond);
+ if (waitAllowed < (unsigned)waitMs)
+ waitMs = waitAllowed;
+ }
+ }
+
+ // Enter blocking run loop. We may continue until we timeout in which
+ // case it's time to service the ticks. Or if commands arrive in the command
+ // queue then the source callback will call 'CFRunLoopStop' causing this
+ // to return.
+ CFTimeInterval blockInterval = 0.001 * (double) waitMs;
+ exitReason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, blockInterval, false);
+
+ if (exitReason == kCFRunLoopRunFinished)
+ {
+ // Maybe this will occur during shutdown?
+ break;
+ }
+ else if (exitReason == kCFRunLoopRunStopped )
+ {
+ // Commands need processing or we're being shutdown.
+ break;
+ }
+ else if (exitReason == kCFRunLoopRunTimedOut)
+ {
+ // Timed out so that we can service our ticks callbacks.
+ continue;
+ }
+ else if (exitReason == kCFRunLoopRunHandledSource)
+ {
+ // Should never occur since the last param when we call
+ // 'CFRunLoopRunInMode' is false.
+ OVR_ASSERT(false);
+ break;
+ }
+ else
+ {
+ OVR_ASSERT_LOG(false, ("CFRunLoopRunInMode returned unexpected code"));
+ break;
+ }
+ }
+ while(true);
+ }
+ }
+
+
+ CFRunLoopRemoveSource(RunLoop, CommandQueueSource, kCFRunLoopDefaultMode);
+ CFRelease(CommandQueueSource);
+
+ LogText("OVR::DeviceManagerThread - exiting (ThreadId=0x%p).\n", GetThreadId());
+
+ return 0;
+}
+
+void DeviceManagerThread::staticCommandQueueSourceCallback(void* pContext)
+{
+ DeviceManagerThread* pThread = (DeviceManagerThread*) pContext;
+ pThread->commandQueueSourceCallback();
+}
+
+void DeviceManagerThread::commandQueueSourceCallback()
+{
+ CFRunLoopStop(RunLoop);
+}
+
+bool DeviceManagerThread::AddTicksNotifier(Notifier* notify)
+{
+ TicksNotifiers.PushBack(notify);
+ return true;
+}
+
+bool DeviceManagerThread::RemoveTicksNotifier(Notifier* notify)
+{
+ for (UPInt i = 0; i < TicksNotifiers.GetSize(); i++)
+ {
+ if (TicksNotifiers[i] == notify)
+ {
+ TicksNotifiers.RemoveAt(i);
+ return true;
+ }
+ }
+ return false;
+}
+
+void DeviceManagerThread::Shutdown()
+{
+ // Push for thread shutdown *WITH NO WAIT*.
+ // This will have the following effect:
+ // - Exit command will get enqueued, which will be executed later on the thread itself.
+ // - Beyond this point, this DeviceManager object may be deleted by our caller.
+ // - Other commands, such as CreateDevice, may execute before ExitCommand, but they will
+ // fail gracefully due to pLock->pManager == 0. Future commands can't be enqued
+ // after pManager is null.
+ // - Once ExitCommand executes, ThreadCommand::Run loop will exit and release the last
+ // reference to the thread object.
+ PushExitCommand(false);
+
+ // make sure CFRunLoopRunInMode is woken up
+ CFRunLoopSourceSignal(CommandQueueSource);
+ CFRunLoopWakeUp(RunLoop);
+}
+
+} // namespace OSX
+
+
+//-------------------------------------------------------------------------------------
+// ***** Creation
+
+// Creates a new DeviceManager and initializes OVR.
+DeviceManager* DeviceManager::Create()
+{
+
+ if (!System::IsInitialized())
+ {
+ // Use custom message, since Log is not yet installed.
+ OVR_DEBUG_STATEMENT(Log::GetDefaultLog()->
+ LogMessage(Log_Debug, "DeviceManager::Create failed - OVR::System not initialized"); );
+ return 0;
+ }
+
+ Ptr<OSX::DeviceManager> manager = *new OSX::DeviceManager;
+
+ if (manager)
+ {
+ if (manager->Initialize(0))
+ {
+ manager->AddFactory(&LatencyTestDeviceFactory::GetInstance());
+ manager->AddFactory(&SensorDeviceFactory::GetInstance());
+ manager->AddFactory(&OSX::HMDDeviceFactory::GetInstance());
+
+ manager->AddRef();
+ }
+ else
+ {
+ manager.Clear();
+ }
+ }
+
+ return manager.GetPtr();
+}
+
+} // namespace OVR
diff --git a/LibOVR/Src/OVR_OSX_DeviceManager.h b/LibOVR/Src/OVR_OSX_DeviceManager.h
new file mode 100644
index 0000000..61af848
--- /dev/null
+++ b/LibOVR/Src/OVR_OSX_DeviceManager.h
@@ -0,0 +1,128 @@
+/************************************************************************************
+
+Filename : OVR_OSX_DeviceManager.h
+Content : OSX specific DeviceManager header.
+Created : March 14, 2013
+Authors : Lee Cooper
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#ifndef OVR_OSX_DeviceManager_h
+#define OVR_OSX_DeviceManager_h
+
+#include "OVR_DeviceImpl.h"
+
+#include "Kernel/OVR_Timer.h"
+
+#include <ApplicationServices/ApplicationServices.h>
+#include <IOKit/hid/IOHIDManager.h>
+
+namespace OVR { namespace OSX {
+
+class DeviceManagerThread;
+
+//-------------------------------------------------------------------------------------
+// ***** OSX DeviceManager
+
+class DeviceManager : public DeviceManagerImpl
+{
+public:
+ DeviceManager();
+ ~DeviceManager();
+
+ // Initialize/Shutdown manager thread.
+ virtual bool Initialize(DeviceBase* parent);
+ virtual void Shutdown();
+
+ virtual ThreadCommandQueue* GetThreadQueue();
+ virtual ThreadId GetThreadId() const;
+
+ virtual DeviceEnumerator<> EnumerateDevicesEx(const DeviceEnumerationArgs& args);
+
+ virtual bool GetDeviceInfo(DeviceInfo* info) const;
+
+protected:
+ static void displayReconfigurationCallBack (CGDirectDisplayID display,
+ CGDisplayChangeSummaryFlags flags,
+ void *userInfo);
+
+public: // data
+ Ptr<DeviceManagerThread> pThread;
+};
+
+//-------------------------------------------------------------------------------------
+// ***** Device Manager Background Thread
+
+class DeviceManagerThread : public Thread, public ThreadCommandQueue
+{
+ friend class DeviceManager;
+ enum { ThreadStackSize = 32 * 1024 };
+public:
+ DeviceManagerThread();
+ ~DeviceManagerThread();
+
+ virtual int Run();
+
+ // ThreadCommandQueue notifications for CommandEvent handling.
+ virtual void OnPushNonEmpty_Locked()
+ {
+ CFRunLoopSourceSignal(CommandQueueSource);
+ CFRunLoopWakeUp(RunLoop);
+ }
+
+ virtual void OnPopEmpty_Locked() {}
+
+
+ // Notifier used for different updates (EVENT or regular timing or messages).
+ class Notifier
+ {
+ public:
+
+ // Called when timing ticks are updated. // Returns the largest number of microseconds
+ // this function can wait till next call.
+ virtual double OnTicks(double tickSeconds)
+ { OVR_UNUSED1(tickSeconds); return 1000.0; }
+ };
+
+ // Add notifier that will be called at regular intervals.
+ bool AddTicksNotifier(Notifier* notify);
+ bool RemoveTicksNotifier(Notifier* notify);
+
+ CFRunLoopRef GetRunLoop()
+ { return RunLoop; }
+
+ void Shutdown();
+private:
+ CFRunLoopRef RunLoop;
+
+ CFRunLoopSourceRef CommandQueueSource;
+
+ static void staticCommandQueueSourceCallback(void* pContext);
+ void commandQueueSourceCallback();
+
+ Event StartupEvent;
+
+ // Ticks notifiers. Used for time-dependent events such as keep-alive.
+ Array<Notifier*> TicksNotifiers;
+};
+
+}} // namespace OSX::OVR
+
+#endif // OVR_OSX_DeviceManager_h
diff --git a/LibOVR/Src/OVR_OSX_HIDDevice.cpp b/LibOVR/Src/OVR_OSX_HIDDevice.cpp
new file mode 100644
index 0000000..af840e0
--- /dev/null
+++ b/LibOVR/Src/OVR_OSX_HIDDevice.cpp
@@ -0,0 +1,924 @@
+/************************************************************************************
+Filename : OVR_OSX_HIDDevice.cpp
+Content : OSX HID device implementation.
+Created : February 26, 2013
+Authors : Lee Cooper
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#include "OVR_OSX_HIDDevice.h"
+
+#include <IOKit/usb/IOUSBLib.h>
+
+namespace OVR { namespace OSX {
+
+
+//-------------------------------------------------------------------------------------
+// **** OSX::DeviceManager
+
+HIDDeviceManager::HIDDeviceManager(DeviceManager* manager)
+ : DevManager(manager)
+{
+ HIDManager = NULL;
+}
+
+HIDDeviceManager::~HIDDeviceManager()
+{
+}
+
+CFRunLoopRef HIDDeviceManager::getRunLoop()
+{
+ if (DevManager != NULL)
+ {
+ return DevManager->pThread->GetRunLoop();
+ }
+
+ return CFRunLoopGetCurrent();
+}
+
+bool HIDDeviceManager::initializeManager()
+{
+ if (HIDManager != NULL)
+ {
+ return true;
+ }
+
+ HIDManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
+
+ if (!HIDManager)
+ {
+ return false;
+ }
+
+ // Create a Matching Dictionary
+ CFMutableDictionaryRef matchDict =
+ CFDictionaryCreateMutable(kCFAllocatorDefault,
+ 2,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+
+ // Specify a device manufacturer in the Matching Dictionary
+ UInt32 vendorId = Oculus_VendorId;
+ CFNumberRef vendorIdRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &vendorId);
+ CFDictionarySetValue(matchDict,
+ CFSTR(kIOHIDVendorIDKey),
+ vendorIdRef);
+ // Register the Matching Dictionary to the HID Manager
+ IOHIDManagerSetDeviceMatching(HIDManager, matchDict);
+ CFRelease(vendorIdRef);
+ CFRelease(matchDict);
+
+ // Register a callback for USB device detection with the HID Manager
+ IOHIDManagerRegisterDeviceMatchingCallback(HIDManager, &staticDeviceMatchingCallback, this);
+
+ IOHIDManagerScheduleWithRunLoop(HIDManager, getRunLoop(), kCFRunLoopDefaultMode);
+
+ return true;
+}
+
+bool HIDDeviceManager::Initialize()
+{
+ return initializeManager();
+}
+
+void HIDDeviceManager::Shutdown()
+{
+ OVR_ASSERT_LOG(HIDManager, ("Should have called 'Initialize' before 'Shutdown'."));
+ CFRelease(HIDManager);
+
+ LogText("OVR::OSX::HIDDeviceManager - shutting down.\n");
+}
+
+bool HIDDeviceManager::getIntProperty(IOHIDDeviceRef device, CFStringRef propertyName, SInt32* pResult)
+{
+
+ CFTypeRef ref = IOHIDDeviceGetProperty(device, propertyName);
+
+ if (!ref)
+ {
+ return false;
+ }
+
+ if (CFGetTypeID(ref) != CFNumberGetTypeID())
+ {
+ return false;
+ }
+
+ CFNumberGetValue((CFNumberRef) ref, kCFNumberSInt32Type, pResult);
+
+ return true;
+}
+
+bool HIDDeviceManager::initVendorProductVersion(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc)
+{
+
+ if (!getVendorId(device, &(pDevDesc->VendorId)))
+ {
+ return false;
+ }
+
+ if (!getProductId(device, &(pDevDesc->ProductId)))
+ {
+ return false;
+ }
+
+ SInt32 result;
+ if (!getIntProperty(device, CFSTR(kIOHIDVersionNumberKey), &result))
+ {
+ return false;
+ }
+ pDevDesc->VersionNumber = result;
+
+ return true;
+}
+
+bool HIDDeviceManager::initUsage(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc)
+{
+
+ SInt32 result;
+
+ if (!getIntProperty(device, CFSTR(kIOHIDPrimaryUsagePageKey), &result))
+ {
+ return false;
+ }
+
+ pDevDesc->UsagePage = result;
+
+
+ if (!getIntProperty(device, CFSTR(kIOHIDPrimaryUsageKey), &result))
+ {
+ return false;
+ }
+
+ pDevDesc->Usage = result;
+
+ return true;
+}
+
+bool HIDDeviceManager::initSerialNumber(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc)
+{
+ return getSerialNumberString(device, &(pDevDesc->SerialNumber));
+}
+
+bool HIDDeviceManager::initStrings(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc)
+{
+
+ // Regardless of whether they fail we'll try and get the remaining.
+ getStringProperty(device, CFSTR(kIOHIDManufacturerKey), &(pDevDesc->Manufacturer));
+ getStringProperty(device, CFSTR(kIOHIDProductKey), &(pDevDesc->Product));
+
+ return true;
+}
+
+bool HIDDeviceManager::getStringProperty(IOHIDDeviceRef device,
+ CFStringRef propertyName,
+ String* pResult)
+{
+
+ CFStringRef str = (CFStringRef) IOHIDDeviceGetProperty(device, propertyName);
+
+ if (!str)
+ {
+ return false;
+ }
+
+ CFIndex length = CFStringGetLength(str);
+ CFRange range = CFRangeMake(0, length);
+
+ // Test the conversion first to get required buffer size.
+ CFIndex bufferLength;
+ CFIndex numberOfChars = CFStringGetBytes(str,
+ range,
+ kCFStringEncodingUTF8,
+ (char) '?',
+ FALSE,
+ NULL,
+ 0,
+ &bufferLength);
+
+ if (numberOfChars == 0)
+ {
+ return false;
+ }
+
+ // Now allocate buffer.
+ char* buffer = new char[bufferLength+1];
+
+ numberOfChars = CFStringGetBytes(str,
+ range,
+ kCFStringEncodingUTF8,
+ (char) '?',
+ FALSE,
+ (UInt8*) buffer,
+ bufferLength,
+ NULL);
+ OVR_ASSERT_LOG(numberOfChars != 0, ("CFStringGetBytes failed."));
+
+ buffer[bufferLength] = '\0';
+ *pResult = String(buffer);
+
+ return true;
+}
+
+bool HIDDeviceManager::getVendorId(IOHIDDeviceRef device, UInt16* pResult)
+{
+ SInt32 result;
+
+ if (!getIntProperty(device, CFSTR(kIOHIDVendorIDKey), &result))
+ {
+ return false;
+ }
+
+ *pResult = result;
+
+ return true;
+}
+
+bool HIDDeviceManager::getProductId(IOHIDDeviceRef device, UInt16* pResult)
+{
+ SInt32 result;
+
+ if (!getIntProperty(device, CFSTR(kIOHIDProductIDKey), &result))
+ {
+ return false;
+ }
+
+ *pResult = result;
+
+ return true;
+}
+
+bool HIDDeviceManager::getLocationId(IOHIDDeviceRef device, SInt32* pResult)
+{
+ SInt32 result;
+
+ if (!getIntProperty(device, CFSTR(kIOHIDLocationIDKey), &result))
+ {
+ return false;
+ }
+
+ *pResult = result;
+
+ return true;
+}
+
+bool HIDDeviceManager::getSerialNumberString(IOHIDDeviceRef device, String* pResult)
+{
+
+ if (!getStringProperty(device, CFSTR(kIOHIDSerialNumberKey), pResult))
+ {
+ return false;
+ }
+
+ return true;
+}
+
+bool HIDDeviceManager::getPath(IOHIDDeviceRef device, String* pPath)
+{
+
+ String transport;
+ if (!getStringProperty(device, CFSTR(kIOHIDTransportKey), &transport))
+ {
+ return false;
+ }
+
+ UInt16 vendorId;
+ if (!getVendorId(device, &vendorId))
+ {
+ return false;
+ }
+
+ UInt16 productId;
+ if (!getProductId(device, &productId))
+ {
+ return false;
+ }
+
+ String serialNumber;
+ if (!getSerialNumberString(device, &serialNumber))
+ {
+ return false;
+ }
+
+
+ StringBuffer buffer;
+ buffer.AppendFormat("%s:vid=%04hx:pid=%04hx:ser=%s",
+ transport.ToCStr(),
+ vendorId,
+ productId,
+ serialNumber.ToCStr());
+
+ *pPath = String(buffer);
+
+ return true;
+}
+
+bool HIDDeviceManager::Enumerate(HIDEnumerateVisitor* enumVisitor)
+{
+ if (!initializeManager())
+ {
+ return false;
+ }
+
+
+ CFSetRef deviceSet = IOHIDManagerCopyDevices(HIDManager);
+ if (!deviceSet)
+ return false;
+
+ CFIndex deviceCount = CFSetGetCount(deviceSet);
+
+ // Allocate a block of memory and read the set into it.
+ IOHIDDeviceRef* devices = (IOHIDDeviceRef*) OVR_ALLOC(sizeof(IOHIDDeviceRef) * deviceCount);
+ CFSetGetValues(deviceSet, (const void **) devices);
+
+
+ // Iterate over devices.
+ for (CFIndex deviceIndex = 0; deviceIndex < deviceCount; deviceIndex++)
+ {
+ IOHIDDeviceRef hidDev = devices[deviceIndex];
+
+ if (!hidDev)
+ {
+ continue;
+ }
+
+ HIDDeviceDesc devDesc;
+
+ if (getPath(hidDev, &(devDesc.Path)) &&
+ initVendorProductVersion(hidDev, &devDesc) &&
+ enumVisitor->MatchVendorProduct(devDesc.VendorId, devDesc.ProductId) &&
+ initUsage(hidDev, &devDesc))
+ {
+ initStrings(hidDev, &devDesc);
+ initSerialNumber(hidDev, &devDesc);
+
+ // Look for the device to check if it is already opened.
+ Ptr<DeviceCreateDesc> existingDevice = DevManager->FindHIDDevice(devDesc, true);
+ // if device exists and it is opened then most likely the CreateHIDFile
+ // will fail; therefore, we just set Enumerated to 'true' and continue.
+ if (existingDevice && existingDevice->pDevice)
+ {
+ existingDevice->Enumerated = true;
+ continue;
+ }
+
+ // Construct minimal device that the visitor callback can get feature reports from.
+ OSX::HIDDevice device(this, hidDev);
+
+ enumVisitor->Visit(device, devDesc);
+ }
+ }
+
+ OVR_FREE(devices);
+ CFRelease(deviceSet);
+
+ return true;
+}
+
+OVR::HIDDevice* HIDDeviceManager::Open(const String& path)
+{
+
+ Ptr<OSX::HIDDevice> device = *new OSX::HIDDevice(this);
+
+ if (!device->HIDInitialize(path))
+ {
+ return NULL;
+ }
+
+ device->AddRef();
+
+ return device;
+}
+
+bool HIDDeviceManager::getFullDesc(IOHIDDeviceRef device, HIDDeviceDesc* desc)
+{
+
+ if (!initVendorProductVersion(device, desc))
+ {
+ return false;
+ }
+
+ if (!initUsage(device, desc))
+ {
+ return false;
+ }
+
+ if (!initSerialNumber(device, desc))
+ {
+ return false;
+ }
+
+ initStrings(device, desc);
+
+ return true;
+}
+
+// New USB device specified in the matching dictionary has been added (callback function)
+void HIDDeviceManager::staticDeviceMatchingCallback(void *inContext,
+ IOReturn inResult,
+ void *inSender,
+ IOHIDDeviceRef inIOHIDDeviceRef)
+{
+ OVR_UNUSED(inResult);
+ OVR_UNUSED(inSender);
+ HIDDeviceManager* hidMgr = static_cast<HIDDeviceManager*>(inContext);
+ HIDDeviceDesc hidDevDesc;
+ hidMgr->getPath(inIOHIDDeviceRef, &hidDevDesc.Path);
+ hidMgr->getFullDesc(inIOHIDDeviceRef, &hidDevDesc);
+
+ hidMgr->DevManager->DetectHIDDevice(hidDevDesc);
+}
+
+//-------------------------------------------------------------------------------------
+// **** OSX::HIDDevice
+
+HIDDevice::HIDDevice(HIDDeviceManager* manager)
+ : InMinimalMode(false), HIDManager(manager)
+{
+ Device = NULL;
+ RepluggedNotificationPort = 0;
+}
+
+// This is a minimal constructor used during enumeration for us to pass
+// a HIDDevice to the visit function (so that it can query feature reports).
+HIDDevice::HIDDevice(HIDDeviceManager* manager, IOHIDDeviceRef device)
+: InMinimalMode(true), HIDManager(manager), Device(device)
+{
+ RepluggedNotificationPort = 0;
+}
+
+HIDDevice::~HIDDevice()
+{
+ if (!InMinimalMode)
+ {
+ HIDShutdown();
+ }
+}
+
+bool HIDDevice::HIDInitialize(const String& path)
+{
+
+ DevDesc.Path = path;
+
+ if (!openDevice())
+ {
+ LogText("OVR::OSX::HIDDevice - Failed to open HIDDevice: %s", path.ToCStr());
+ return false;
+ }
+
+ // Setup notification for when a device is unplugged and plugged back in.
+ if (!setupDevicePluggedInNotification())
+ {
+ LogText("OVR::OSX::HIDDevice - Failed to setup notification for when device plugged back in.");
+ closeDevice(false);
+ return false;
+ }
+
+ HIDManager->DevManager->pThread->AddTicksNotifier(this);
+
+
+ LogText("OVR::OSX::HIDDevice - Opened '%s'\n"
+ " Manufacturer:'%s' Product:'%s' Serial#:'%s'\n",
+ DevDesc.Path.ToCStr(),
+ DevDesc.Manufacturer.ToCStr(), DevDesc.Product.ToCStr(),
+ DevDesc.SerialNumber.ToCStr());
+
+ return true;
+}
+
+bool HIDDevice::initInfo()
+{
+ // Device must have been successfully opened.
+ OVR_ASSERT(Device);
+
+
+ // Get report lengths.
+ SInt32 bufferLength;
+ bool getResult = HIDManager->getIntProperty(Device, CFSTR(kIOHIDMaxInputReportSizeKey), &bufferLength);
+ OVR_ASSERT(getResult);
+ InputReportBufferLength = (UInt16) bufferLength;
+
+ getResult = HIDManager->getIntProperty(Device, CFSTR(kIOHIDMaxOutputReportSizeKey), &bufferLength);
+ OVR_ASSERT(getResult);
+ OutputReportBufferLength = (UInt16) bufferLength;
+
+ getResult = HIDManager->getIntProperty(Device, CFSTR(kIOHIDMaxFeatureReportSizeKey), &bufferLength);
+ OVR_ASSERT(getResult);
+ FeatureReportBufferLength = (UInt16) bufferLength;
+
+
+ if (ReadBufferSize < InputReportBufferLength)
+ {
+ OVR_ASSERT_LOG(false, ("Input report buffer length is bigger than read buffer."));
+ return false;
+ }
+
+ // Get device desc.
+ if (!HIDManager->getFullDesc(Device, &DevDesc))
+ {
+ OVR_ASSERT_LOG(false, ("Failed to get device desc while initializing device."));
+ return false;
+ }
+
+ return true;
+}
+
+void HIDDevice::staticDeviceAddedCallback(void* pContext, io_iterator_t iterator)
+{
+ HIDDevice* pDevice = (HIDDevice*) pContext;
+ pDevice->deviceAddedCallback(iterator);
+}
+
+void HIDDevice::deviceAddedCallback(io_iterator_t iterator)
+{
+
+ if (Device == NULL)
+ {
+ if (openDevice())
+ {
+ LogText("OVR::OSX::HIDDevice - Reopened device : %s", DevDesc.Path.ToCStr());
+
+ Ptr<DeviceCreateDesc> existingHIDDev = HIDManager->DevManager->FindHIDDevice(DevDesc, true);
+ if (existingHIDDev && existingHIDDev->pDevice)
+ {
+ HIDManager->DevManager->CallOnDeviceAdded(existingHIDDev);
+ }
+ }
+ }
+
+ // Reset callback.
+ while (IOIteratorNext(iterator))
+ ;
+}
+
+bool HIDDevice::openDevice()
+{
+
+ // Have to iterate through devices again to generate paths.
+ CFSetRef deviceSet = IOHIDManagerCopyDevices(HIDManager->HIDManager);
+ CFIndex deviceCount = CFSetGetCount(deviceSet);
+
+ // Allocate a block of memory and read the set into it.
+ IOHIDDeviceRef* devices = (IOHIDDeviceRef*) OVR_ALLOC(sizeof(IOHIDDeviceRef) * deviceCount);
+ CFSetGetValues(deviceSet, (const void **) devices);
+
+
+ // Iterate over devices.
+ IOHIDDeviceRef device = NULL;
+
+ for (CFIndex deviceIndex = 0; deviceIndex < deviceCount; deviceIndex++)
+ {
+ IOHIDDeviceRef tmpDevice = devices[deviceIndex];
+
+ if (!tmpDevice)
+ {
+ continue;
+ }
+
+ String path;
+ if (!HIDManager->getPath(tmpDevice, &path))
+ {
+ continue;
+ }
+
+ if (path == DevDesc.Path)
+ {
+ device = tmpDevice;
+ break;
+ }
+ }
+
+
+ OVR_FREE(devices);
+
+ if (!device)
+ {
+ CFRelease(deviceSet);
+ return false;
+ }
+
+ // Attempt to open device.
+ if (IOHIDDeviceOpen(device, kIOHIDOptionsTypeSeizeDevice)
+ != kIOReturnSuccess)
+ {
+ CFRelease(deviceSet);
+ return false;
+ }
+
+ // Retain the device before we release the set.
+ CFRetain(device);
+ CFRelease(deviceSet);
+
+
+ Device = device;
+
+
+ if (!initInfo())
+ {
+ IOHIDDeviceClose(Device, kIOHIDOptionsTypeSeizeDevice);
+ CFRelease(Device);
+ Device = NULL;
+ return false;
+ }
+
+
+ // Setup the Run Loop and callbacks.
+ IOHIDDeviceScheduleWithRunLoop(Device,
+ HIDManager->getRunLoop(),
+ kCFRunLoopDefaultMode);
+
+ IOHIDDeviceRegisterInputReportCallback(Device,
+ ReadBuffer,
+ ReadBufferSize,
+ staticHIDReportCallback,
+ this);
+
+ IOHIDDeviceRegisterRemovalCallback(Device,
+ staticDeviceRemovedCallback,
+ this);
+
+ return true;
+}
+
+void HIDDevice::HIDShutdown()
+{
+
+ HIDManager->DevManager->pThread->RemoveTicksNotifier(this);
+
+ if (Device != NULL) // Device may already have been closed if unplugged.
+ {
+ closeDevice(false);
+ }
+
+ IOObjectRelease(RepluggedNotification);
+ if (RepluggedNotificationPort)
+ IONotificationPortDestroy(RepluggedNotificationPort);
+
+ LogText("OVR::OSX::HIDDevice - HIDShutdown '%s'\n", DevDesc.Path.ToCStr());
+}
+
+bool HIDDevice::setupDevicePluggedInNotification()
+{
+
+ // Setup notification when devices are plugged in.
+ RepluggedNotificationPort = IONotificationPortCreate(kIOMasterPortDefault);
+
+ CFRunLoopSourceRef notificationRunLoopSource =
+ IONotificationPortGetRunLoopSource(RepluggedNotificationPort);
+
+ CFRunLoopAddSource(HIDManager->getRunLoop(),
+ notificationRunLoopSource,
+ kCFRunLoopDefaultMode);
+
+ CFMutableDictionaryRef matchingDict = IOServiceMatching(kIOUSBDeviceClassName);
+
+ // Have to specify vendorId and productId. Doesn't seem to accept additional
+ // things like serial number.
+ SInt32 vendorId = DevDesc.VendorId;
+ CFNumberRef numberRef = CFNumberCreate(kCFAllocatorDefault,
+ kCFNumberSInt32Type,
+ &vendorId);
+ CFDictionarySetValue(matchingDict, CFSTR(kUSBVendorID), numberRef);
+ CFRelease(numberRef);
+
+ SInt32 deviceProductId = DevDesc.ProductId;
+ numberRef = CFNumberCreate(kCFAllocatorDefault,
+ kCFNumberSInt32Type,
+ &deviceProductId);
+ CFDictionarySetValue(matchingDict, CFSTR(kUSBProductID), numberRef);
+ CFRelease(numberRef);
+
+ kern_return_t result =
+ IOServiceAddMatchingNotification(RepluggedNotificationPort,
+ kIOMatchedNotification,
+ matchingDict,
+ staticDeviceAddedCallback,
+ this,
+ &RepluggedNotification);
+
+ if (result != KERN_SUCCESS)
+ {
+ CFRelease(RepluggedNotificationPort);
+ RepluggedNotificationPort = 0;
+ return false;
+ }
+
+ // Iterate through to arm.
+ while (IOIteratorNext(RepluggedNotification))
+ {
+ }
+
+ return true;
+}
+
+void HIDDevice::closeDevice(bool wasUnplugged)
+{
+ OVR_ASSERT(Device != NULL);
+
+ if (!wasUnplugged)
+ {
+ // Clear the registered callbacks.
+ IOHIDDeviceRegisterInputReportCallback(Device,
+ ReadBuffer,
+ InputReportBufferLength,
+ NULL,
+ this);
+
+ IOHIDDeviceRegisterRemovalCallback(Device, NULL, this);
+
+ IOHIDDeviceUnscheduleFromRunLoop(Device,
+ HIDManager->getRunLoop(),
+ kCFRunLoopDefaultMode);
+ IOHIDDeviceClose(Device, kIOHIDOptionsTypeNone);
+ }
+
+ CFRelease(Device);
+ Device = NULL;
+
+ LogText("OVR::OSX::HIDDevice - HID Device Closed '%s'\n", DevDesc.Path.ToCStr());
+}
+
+void HIDDevice::staticHIDReportCallback(void* pContext,
+ IOReturn result,
+ void* pSender,
+ IOHIDReportType reportType,
+ uint32_t reportId,
+ uint8_t* pReport,
+ CFIndex reportLength)
+{
+ OVR_UNUSED(result);
+ OVR_UNUSED(pSender);
+ OVR_UNUSED(reportType);
+ OVR_UNUSED(reportId);
+
+ HIDDevice* pDevice = (HIDDevice*) pContext;
+ return pDevice->hidReportCallback(pReport, (UInt32)reportLength);
+}
+
+void HIDDevice::hidReportCallback(UByte* pData, UInt32 length)
+{
+
+ // We got data.
+ if (Handler)
+ {
+ Handler->OnInputReport(pData, length);
+ }
+}
+
+void HIDDevice::staticDeviceRemovedCallback(void* pContext, IOReturn result, void* pSender)
+{
+ OVR_UNUSED(result);
+ OVR_UNUSED(pSender);
+ HIDDevice* pDevice = (HIDDevice*) pContext;
+ pDevice->deviceRemovedCallback();
+}
+
+void HIDDevice::deviceRemovedCallback()
+{
+ Ptr<HIDDevice> _this(this); // prevent from release
+
+ Ptr<DeviceCreateDesc> existingHIDDev = HIDManager->DevManager->FindHIDDevice(DevDesc, true);
+ if (existingHIDDev && existingHIDDev->pDevice)
+ {
+ HIDManager->DevManager->CallOnDeviceRemoved(existingHIDDev);
+ }
+ closeDevice(true);
+}
+
+CFStringRef HIDDevice::generateRunLoopModeString(IOHIDDeviceRef device)
+{
+ const UInt32 safeBuffSize = 256;
+ char nameBuff[safeBuffSize];
+ OVR_sprintf(nameBuff, safeBuffSize, "%016lX", device);
+
+ return CFStringCreateWithCString(NULL, nameBuff, kCFStringEncodingASCII);
+}
+
+bool HIDDevice::SetFeatureReport(UByte* data, UInt32 length)
+{
+
+ if (!Device)
+ return false;
+
+ UByte reportID = data[0];
+
+ if (reportID == 0)
+ {
+ // Not using reports so remove from data packet.
+ data++;
+ length--;
+ }
+
+ IOReturn result = IOHIDDeviceSetReport( Device,
+ kIOHIDReportTypeFeature,
+ reportID,
+ data,
+ length);
+
+ return (result == kIOReturnSuccess);
+}
+
+bool HIDDevice::GetFeatureReport(UByte* data, UInt32 length)
+{
+ if (!Device)
+ return false;
+
+ CFIndex bufferLength = length;
+
+ // Report id is in first byte of the buffer.
+ IOReturn result = IOHIDDeviceGetReport(Device, kIOHIDReportTypeFeature, data[0], data, &bufferLength);
+
+ return (result == kIOReturnSuccess);
+}
+
+double HIDDevice::OnTicks(double tickSeconds)
+{
+
+ if (Handler)
+ {
+ return Handler->OnTicks(tickSeconds);
+ }
+
+ return DeviceManagerThread::Notifier::OnTicks(tickSeconds);
+}
+
+HIDDeviceManager* HIDDeviceManager::CreateInternal(OSX::DeviceManager* devManager)
+{
+
+ if (!System::IsInitialized())
+ {
+ // Use custom message, since Log is not yet installed.
+ OVR_DEBUG_STATEMENT(Log::GetDefaultLog()->
+ LogMessage(Log_Debug, "HIDDeviceManager::Create failed - OVR::System not initialized"); );
+ return 0;
+ }
+
+ Ptr<OSX::HIDDeviceManager> manager = *new OSX::HIDDeviceManager(devManager);
+
+ if (manager)
+ {
+ if (manager->Initialize())
+ {
+ manager->AddRef();
+ }
+ else
+ {
+ manager.Clear();
+ }
+ }
+
+ return manager.GetPtr();
+}
+
+} // namespace OSX
+
+//-------------------------------------------------------------------------------------
+// ***** Creation
+
+// Creates a new HIDDeviceManager and initializes OVR.
+HIDDeviceManager* HIDDeviceManager::Create(Ptr<OVR::DeviceManager>& deviceManager)
+{
+
+ if (!System::IsInitialized())
+ {
+ // Use custom message, since Log is not yet installed.
+ OVR_DEBUG_STATEMENT(Log::GetDefaultLog()->
+ LogMessage(Log_Debug, "HIDDeviceManager::Create failed - OVR::System not initialized"); );
+ return 0;
+ }
+
+ Ptr<OSX::DeviceManager> deviceManagerOSX = *new OSX::DeviceManager;
+
+ if (!deviceManagerOSX)
+ {
+ return NULL;
+ }
+
+ if (!deviceManagerOSX->Initialize(NULL))
+ {
+ return NULL;
+ }
+
+ deviceManager = deviceManagerOSX;
+
+ return deviceManagerOSX->GetHIDDeviceManager();
+}
+
+} // namespace OVR
diff --git a/LibOVR/Src/OVR_OSX_HIDDevice.h b/LibOVR/Src/OVR_OSX_HIDDevice.h
new file mode 100644
index 0000000..c6140cb
--- /dev/null
+++ b/LibOVR/Src/OVR_OSX_HIDDevice.h
@@ -0,0 +1,160 @@
+/************************************************************************************
+Filename : OVR_OSX_HIDDevice.h
+Content : OSX HID device implementation.
+Created : February 26, 2013
+Authors : Lee Cooper
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#ifndef OVR_OSX_HIDDevice_h
+#define OVR_OSX_HIDDevice_h
+
+#include "OVR_HIDDevice.h"
+
+#include "OVR_OSX_DeviceManager.h"
+
+#include <IOKit/IOKitLib.h>
+
+namespace OVR { namespace OSX {
+
+class HIDDeviceManager;
+
+//-------------------------------------------------------------------------------------
+// ***** OSX HIDDevice
+
+class HIDDevice : public OVR::HIDDevice, public DeviceManagerThread::Notifier
+{
+private:
+ friend class HIDDeviceManager;
+
+public:
+ HIDDevice(HIDDeviceManager* manager);
+
+ // This is a minimal constructor used during enumeration for us to pass
+ // a HIDDevice to the visit function (so that it can query feature reports).
+ HIDDevice(HIDDeviceManager* manager, IOHIDDeviceRef device);
+
+ virtual ~HIDDevice();
+
+ bool HIDInitialize(const String& path);
+ void HIDShutdown();
+
+ virtual bool SetFeatureReport(UByte* data, UInt32 length);
+ virtual bool GetFeatureReport(UByte* data, UInt32 length);
+
+ bool Write(UByte* data, UInt32 length);
+
+ bool Read(UByte* pData, UInt32 length, UInt32 timeoutMilliS);
+ bool ReadBlocking(UByte* pData, UInt32 length);
+
+
+ // DeviceManagerThread::Notifier
+ double OnTicks(double tickSeconds);
+
+private:
+ bool initInfo();
+ bool openDevice();
+ void closeDevice(bool wasUnplugged);
+ bool setupDevicePluggedInNotification();
+ CFStringRef generateRunLoopModeString(IOHIDDeviceRef device);
+
+ static void staticHIDReportCallback(void* pContext,
+ IOReturn result,
+ void* pSender,
+ IOHIDReportType reportType,
+ uint32_t reportId,
+ uint8_t* pReport,
+ CFIndex reportLength);
+ void hidReportCallback(UByte* pData, UInt32 length);
+
+ static void staticDeviceRemovedCallback(void* pContext,
+ IOReturn result,
+ void* pSender);
+ void deviceRemovedCallback();
+
+ static void staticDeviceAddedCallback(void* pContext,
+ io_iterator_t iterator);
+ void deviceAddedCallback(io_iterator_t iterator);
+
+ bool InMinimalMode;
+ HIDDeviceManager* HIDManager;
+ IOHIDDeviceRef Device;
+ HIDDeviceDesc DevDesc;
+
+ enum { ReadBufferSize = 96 };
+ UByte ReadBuffer[ReadBufferSize];
+
+ UInt16 InputReportBufferLength;
+ UInt16 OutputReportBufferLength;
+ UInt16 FeatureReportBufferLength;
+
+ IONotificationPortRef RepluggedNotificationPort;
+ io_iterator_t RepluggedNotification;
+};
+
+
+//-------------------------------------------------------------------------------------
+// ***** OSX HIDDeviceManager
+
+class HIDDeviceManager : public OVR::HIDDeviceManager
+{
+ friend class HIDDevice;
+
+public:
+ HIDDeviceManager(OSX::DeviceManager* Manager);
+ virtual ~HIDDeviceManager();
+
+ virtual bool Initialize();
+ virtual void Shutdown();
+
+ virtual bool Enumerate(HIDEnumerateVisitor* enumVisitor);
+ virtual OVR::HIDDevice* Open(const String& path);
+
+ static HIDDeviceManager* CreateInternal(DeviceManager* manager);
+
+private:
+ CFRunLoopRef getRunLoop();
+ bool initializeManager();
+ bool initVendorProductVersion(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc);
+ bool initUsage(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc);
+ bool initStrings(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc);
+ bool initSerialNumber(IOHIDDeviceRef device, HIDDeviceDesc* pDevDesc);
+ bool getVendorId(IOHIDDeviceRef device, UInt16* pResult);
+ bool getProductId(IOHIDDeviceRef device, UInt16* pResult);
+ bool getLocationId(IOHIDDeviceRef device, SInt32* pResult);
+ bool getSerialNumberString(IOHIDDeviceRef device, String* pResult);
+ bool getPath(IOHIDDeviceRef device, String* pPath);
+ bool getIntProperty(IOHIDDeviceRef device, CFStringRef key, int32_t* pResult);
+ bool getStringProperty(IOHIDDeviceRef device, CFStringRef propertyName, String* pResult);
+ bool getFullDesc(IOHIDDeviceRef device, HIDDeviceDesc* desc);
+
+ static void staticDeviceMatchingCallback(void *inContext,
+ IOReturn inResult,
+ void *inSender,
+ IOHIDDeviceRef inIOHIDDeviceRef);
+
+ DeviceManager* DevManager;
+
+ IOHIDManagerRef HIDManager;
+};
+
+}} // namespace OVR::OSX
+
+#endif // OVR_OSX_HIDDevice_h
diff --git a/LibOVR/Src/OVR_OSX_HMDDevice.cpp b/LibOVR/Src/OVR_OSX_HMDDevice.cpp
new file mode 100644
index 0000000..e16de81
--- /dev/null
+++ b/LibOVR/Src/OVR_OSX_HMDDevice.cpp
@@ -0,0 +1,264 @@
+/************************************************************************************
+
+Filename : OVR_OSX_HMDDevice.cpp
+Content : OSX Interface to HMD - detects HMD display
+Created : September 21, 2012
+Authors : Michael Antonov
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#include "OVR_OSX_HMDDevice.h"
+
+#include "OVR_OSX_DeviceManager.h"
+#include "Util/Util_Render_Stereo.h"
+
+#include "OVR_OSX_HMDDevice.h"
+#include <ApplicationServices/ApplicationServices.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreFoundation/CFString.h>
+#include <IOKit/graphics/IOGraphicsLib.h>
+
+namespace OVR { namespace OSX {
+
+using namespace OVR::Util::Render;
+
+//-------------------------------------------------------------------------------------
+
+HMDDeviceCreateDesc::HMDDeviceCreateDesc(DeviceFactory* factory,
+ UInt32 vend, UInt32 prod, const String& displayDeviceName, int dispId)
+ : DeviceCreateDesc(factory, Device_HMD),
+ DisplayDeviceName(displayDeviceName),
+ Contents(0),
+ DisplayId(dispId)
+{
+ OVR_UNUSED(vend);
+ OVR_UNUSED(prod);
+ DeviceId = DisplayDeviceName;
+
+ Desktop.X = 0;
+ Desktop.Y = 0;
+ ResolutionInPixels = Sizei(0);
+ ScreenSizeInMeters = Sizef(0.0f);
+ VCenterFromTopInMeters = 0.0f;
+ LensSeparationInMeters = 0.0f;
+}
+
+HMDDeviceCreateDesc::HMDDeviceCreateDesc(const HMDDeviceCreateDesc& other)
+ : DeviceCreateDesc(other.pFactory, Device_HMD),
+ DeviceId(other.DeviceId), DisplayDeviceName(other.DisplayDeviceName),
+ Contents(other.Contents),
+ DisplayId(other.DisplayId)
+{
+ Desktop.X = other.Desktop.X;
+ Desktop.Y = other.Desktop.Y;
+ ResolutionInPixels = other.ResolutionInPixels;
+ ScreenSizeInMeters = other.ScreenSizeInMeters;
+ VCenterFromTopInMeters = other.VCenterFromTopInMeters;
+ LensSeparationInMeters = other.LensSeparationInMeters;
+}
+
+HMDDeviceCreateDesc::MatchResult HMDDeviceCreateDesc::MatchDevice(const DeviceCreateDesc& other,
+ DeviceCreateDesc** pcandidate) const
+{
+ if ((other.Type != Device_HMD) || (other.pFactory != pFactory))
+ return Match_None;
+
+ // There are several reasons we can come in here:
+ // a) Matching this HMD Monitor created desc to OTHER HMD Monitor desc
+ // - Require exact device DeviceId/DeviceName match
+ // b) Matching SensorDisplayInfo created desc to OTHER HMD Monitor desc
+ // - This DeviceId is empty; becomes candidate
+ // c) Matching this HMD Monitor created desc to SensorDisplayInfo desc
+ // - This other.DeviceId is empty; becomes candidate
+
+ const HMDDeviceCreateDesc& s2 = (const HMDDeviceCreateDesc&) other;
+
+ if ((DeviceId == s2.DeviceId) &&
+ (DisplayId == s2.DisplayId))
+ {
+ // Non-null DeviceId may match while size is different if screen size was overwritten
+ // by SensorDisplayInfo in prior iteration.
+ if (!DeviceId.IsEmpty() ||
+ (ScreenSizeInMeters == s2.ScreenSizeInMeters) )
+ {
+ *pcandidate = 0;
+ return Match_Found;
+ }
+ }
+
+
+ // DisplayInfo takes precedence, although we try to match it first.
+ if ((ResolutionInPixels == s2.ResolutionInPixels) &&
+ (ScreenSizeInMeters == s2.ScreenSizeInMeters))
+ {
+ if (DeviceId.IsEmpty() && !s2.DeviceId.IsEmpty())
+ {
+ *pcandidate = const_cast<DeviceCreateDesc*>((const DeviceCreateDesc*)this);
+ return Match_Candidate;
+ }
+
+ *pcandidate = 0;
+ return Match_Found;
+ }
+
+ // SensorDisplayInfo may override resolution settings, so store as candidiate.
+ if (s2.DeviceId.IsEmpty() && s2.DisplayId == 0)
+ {
+ *pcandidate = const_cast<DeviceCreateDesc*>((const DeviceCreateDesc*)this);
+ return Match_Candidate;
+ }
+ // OTHER HMD Monitor desc may initialize DeviceName/Id
+ else if (DeviceId.IsEmpty() && DisplayId == 0)
+ {
+ *pcandidate = const_cast<DeviceCreateDesc*>((const DeviceCreateDesc*)this);
+ return Match_Candidate;
+ }
+
+ return Match_None;
+}
+
+
+bool HMDDeviceCreateDesc::UpdateMatchedCandidate(const DeviceCreateDesc& other, bool* newDeviceFlag)
+{
+ // This candidate was the the "best fit" to apply sensor DisplayInfo to.
+ OVR_ASSERT(other.Type == Device_HMD);
+
+ const HMDDeviceCreateDesc& s2 = (const HMDDeviceCreateDesc&) other;
+
+ // Force screen size on resolution from SensorDisplayInfo.
+ // We do this because USB detection is more reliable as compared to HDMI EDID,
+ // which may be corrupted by splitter reporting wrong monitor
+ if (s2.DeviceId.IsEmpty() && s2.DisplayId == 0)
+ {
+ ScreenSizeInMeters = s2.ScreenSizeInMeters;
+ Contents |= Contents_Screen;
+
+ if (s2.Contents & HMDDeviceCreateDesc::Contents_Distortion)
+ {
+ memcpy(DistortionK, s2.DistortionK, sizeof(float)*4);
+ // TODO: DistortionEqn
+ Contents |= Contents_Distortion;
+ }
+ DeviceId = s2.DeviceId;
+ DisplayId = s2.DisplayId;
+ DisplayDeviceName = s2.DisplayDeviceName;
+ Desktop.X = s2.Desktop.X;
+ Desktop.Y = s2.Desktop.Y;
+ if (newDeviceFlag) *newDeviceFlag = true;
+ }
+ else if (DeviceId.IsEmpty())
+ {
+ // This branch is executed when 'fake' HMD descriptor is being replaced by
+ // the real one.
+ DeviceId = s2.DeviceId;
+ DisplayId = s2.DisplayId;
+ DisplayDeviceName = s2.DisplayDeviceName;
+ Desktop.X = s2.Desktop.X;
+ Desktop.Y = s2.Desktop.Y;
+
+ // ScreenSize and Resolution are NOT assigned here, since they may have
+ // come from a sensor DisplayInfo (which has precedence over HDMI).
+
+ if (newDeviceFlag) *newDeviceFlag = true;
+ }
+ else
+ {
+ if (newDeviceFlag) *newDeviceFlag = false;
+ }
+
+ return true;
+}
+
+
+//-------------------------------------------------------------------------------------
+
+
+//-------------------------------------------------------------------------------------
+// ***** HMDDeviceFactory
+
+HMDDeviceFactory &HMDDeviceFactory::GetInstance()
+{
+ static HMDDeviceFactory instance;
+ return instance;
+}
+
+void HMDDeviceFactory::EnumerateDevices(EnumerateVisitor& visitor)
+{
+ CGDirectDisplayID Displays[32];
+ uint32_t NDisplays = 0;
+ CGGetOnlineDisplayList(32, Displays, &NDisplays);
+
+ for (unsigned int i = 0; i < NDisplays; i++)
+ {
+ io_service_t port = CGDisplayIOServicePort(Displays[i]);
+ CFDictionaryRef DispInfo = IODisplayCreateInfoDictionary(port, kIODisplayMatchingInfo);
+
+ uint32_t vendor = CGDisplayVendorNumber(Displays[i]);
+ uint32_t product = CGDisplayModelNumber(Displays[i]);
+
+ CGRect desktop = CGDisplayBounds(Displays[i]);
+
+ if (vendor == 16082 && ( (product == 1)||(product == 2) ) ) // 7" or HD
+ {
+ char idstring[9];
+ idstring[0] = 'A'-1+((vendor>>10) & 31);
+ idstring[1] = 'A'-1+((vendor>>5) & 31);
+ idstring[2] = 'A'-1+((vendor>>0) & 31);
+ snprintf(idstring+3, 5, "%04d", product);
+
+ HMDDeviceCreateDesc hmdCreateDesc(this, vendor, product, idstring, Displays[i]);
+
+ // Hard-coded defaults in case the device doesn't have the data itself.
+ if (product == 3)
+ { // DK2 prototypes and variants (default to HmdType_DK2)
+ hmdCreateDesc.SetScreenParameters(desktop.origin.x, desktop.origin.y,
+ 1920, 1080, 0.12576f, 0.07074f, 0.12576f*0.5f, 0.0635f );
+ }
+ else if (product == 2)
+ { // HD Prototypes (default to HmdType_DKHDProto)
+ hmdCreateDesc.SetScreenParameters(desktop.origin.x, desktop.origin.y,
+ 1920, 1080, 0.12096f, 0.06804f, 0.06804f*0.5f, 0.0635f);
+ }
+ else if (product == 1)
+ { // DK1
+ hmdCreateDesc.SetScreenParameters(desktop.origin.x, desktop.origin.y,
+ 1280, 800, 0.14976f, 0.0936f, 0.0936f*0.5f, 0.0635f);
+ }
+ else
+ { // Future Oculus HMD devices (default to DK1 dimensions)
+ hmdCreateDesc.SetScreenParameters(desktop.origin.x, desktop.origin.y,
+ 1280, 800, 0.14976f, 0.0936f, 0.0936f*0.5f, 0.0635f);
+ }
+
+ OVR_DEBUG_LOG_TEXT(("DeviceManager - HMD Found %x:%x\n", vendor, product));
+
+ // Notify caller about detected device. This will call EnumerateAddDevice
+ // if the this is the first time device was detected.
+ visitor.Visit(hmdCreateDesc);
+ }
+ CFRelease(DispInfo);
+ }
+}
+
+#include "OVR_Common_HMDDevice.cpp"
+
+}} // namespace OVR::OSX
+
+
diff --git a/LibOVR/Src/OVR_OSX_HMDDevice.h b/LibOVR/Src/OVR_OSX_HMDDevice.h
new file mode 100644
index 0000000..dd5c0fe
--- /dev/null
+++ b/LibOVR/Src/OVR_OSX_HMDDevice.h
@@ -0,0 +1,153 @@
+/************************************************************************************
+
+Filename : OVR_OSX_HMDDevice.h
+Content : OSX HMDDevice implementation
+Created : September 21, 2012
+Authors : Michael Antonov
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#ifndef OVR_OSX_HMDDevice_h
+#define OVR_OSX_HMDDevice_h
+
+#include "OVR_DeviceImpl.h"
+#include "Kernel/OVR_String.h"
+#include "OVR_Profile.h"
+
+namespace OVR { namespace OSX {
+
+class HMDDevice;
+
+
+//-------------------------------------------------------------------------------------
+
+// HMDDeviceFactory enumerates attached Oculus HMD devices.
+//
+// This is currently done by matching monitor device strings.
+
+class HMDDeviceFactory : public DeviceFactory
+{
+public:
+ static HMDDeviceFactory &GetInstance();
+
+ // Enumerates devices, creating and destroying relevant objects in manager.
+ virtual void EnumerateDevices(EnumerateVisitor& visitor);
+
+protected:
+ DeviceManager* getManager() const { return (DeviceManager*) pManager; }
+};
+
+
+class HMDDeviceCreateDesc : public DeviceCreateDesc
+{
+ friend class HMDDevice;
+
+protected:
+ enum
+ {
+ Contents_Screen = 1,
+ Contents_Distortion = 2,
+ };
+ String DeviceId;
+ String DisplayDeviceName;
+ struct
+ {
+ int X, Y;
+ } Desktop;
+ unsigned int Contents;
+
+ Sizei ResolutionInPixels;
+ Sizef ScreenSizeInMeters;
+ float VCenterFromTopInMeters;
+ float LensSeparationInMeters;
+
+ // TODO: update these to splines.
+ DistortionEqnType DistortionEqn;
+ float DistortionK[4];
+
+ int DisplayId;
+
+public:
+ HMDDeviceCreateDesc(DeviceFactory* factory,
+ UInt32 vendor, UInt32 product, const String& displayDeviceName, int dispId);
+ HMDDeviceCreateDesc(const HMDDeviceCreateDesc& other);
+
+ virtual DeviceCreateDesc* Clone() const
+ {
+ return new HMDDeviceCreateDesc(*this);
+ }
+
+ virtual DeviceBase* NewDeviceInstance();
+
+ virtual MatchResult MatchDevice(const DeviceCreateDesc& other,
+ DeviceCreateDesc**) const;
+
+ virtual bool UpdateMatchedCandidate(const DeviceCreateDesc&, bool* newDeviceFlag = NULL);
+
+ virtual bool GetDeviceInfo(DeviceInfo* info) const;
+
+ void SetScreenParameters(int x, int y,
+ int hres, int vres,
+ float hsize, float vsize,
+ float vCenterFromTopInMeters, float lensSeparationInMeters);
+ void SetDistortion(const float* dks);
+
+ HmdTypeEnum GetHmdType() const;
+};
+
+
+//-------------------------------------------------------------------------------------
+
+// HMDDevice represents an Oculus HMD device unit. An instance of this class
+// is typically created from the DeviceManager.
+// After HMD device is created, we its sensor data can be obtained by
+// first creating a Sensor object and then wrappig it in SensorFusion.
+
+class HMDDevice : public DeviceImpl<OVR::HMDDevice>
+{
+public:
+ HMDDevice(HMDDeviceCreateDesc* createDesc);
+ ~HMDDevice();
+
+ virtual bool Initialize(DeviceBase* parent);
+ virtual void Shutdown();
+
+ // Requests the currently used default profile. This profile affects the
+ // settings reported by HMDInfo.
+ virtual Profile* GetProfile();
+ virtual const char* GetProfileName();
+ virtual bool SetProfileName(const char* name);
+
+ // Query associated sensor.
+ virtual OVR::SensorDevice* GetSensor();
+
+protected:
+ HMDDeviceCreateDesc* getDesc() const { return (HMDDeviceCreateDesc*)pCreateDesc.GetPtr(); }
+
+ // User name for the profile used with this device.
+ String ProfileName;
+ mutable Ptr<Profile> pCachedProfile;
+};
+
+
+}} // namespace OVR::OSX
+
+#endif // OVR_OSX_HMDDevice_h
+
diff --git a/LibOVR/Src/OVR_OSX_SensorDevice.cpp b/LibOVR/Src/OVR_OSX_SensorDevice.cpp
new file mode 100644
index 0000000..9b783c6
--- /dev/null
+++ b/LibOVR/Src/OVR_OSX_SensorDevice.cpp
@@ -0,0 +1,58 @@
+/************************************************************************************
+
+Filename : OVR_OSX_SensorDevice.cpp
+Content : OSX SensorDevice implementation
+Created : March 14, 2013
+Authors : Lee Cooper
+
+Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+
+Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
+otherwise accompanies this software in either electronic or hard copy form.
+
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.1
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*************************************************************************************/
+
+#include "OVR_OSX_HMDDevice.h"
+#include "OVR_SensorImpl.h"
+#include "OVR_DeviceImpl.h"
+
+namespace OVR { namespace OSX {
+
+} // namespace OSX
+
+//-------------------------------------------------------------------------------------
+void SensorDeviceImpl::EnumerateHMDFromSensorDisplayInfo(const SensorDisplayInfoImpl& displayInfo,
+ DeviceFactory::EnumerateVisitor& visitor)
+{
+
+ OSX::HMDDeviceCreateDesc hmdCreateDesc(&OSX::HMDDeviceFactory::GetInstance(), 1, 1, "", 0);
+
+ hmdCreateDesc.SetScreenParameters( 0, 0,
+ displayInfo.HResolution, displayInfo.VResolution,
+ displayInfo.HScreenSize, displayInfo.VScreenSize,
+ displayInfo.VCenter, displayInfo.LensSeparation);
+
+ if ((displayInfo.DistortionType & SensorDisplayInfoImpl::Mask_BaseFmt) == SensorDisplayInfoImpl::Base_Distortion)
+ {
+ hmdCreateDesc.SetDistortion(displayInfo.DistortionK);
+ // TODO: add DistortionEqn
+ }
+
+ visitor.Visit(hmdCreateDesc);
+}
+
+} // namespace OVR
+
+