Prox sensor re-integration (#220)

* added arbitrary orientation change

* removed commented code

* updated to OVR 1.4.18

* changed two instances using new to init via array

* moved prox sensor action to haptic instead of Misc

* fixed json file, added prox sensor back for mic mute/un-mute

* added proximity sensor to audio and haptic chaperone warnings

* fixed fall-through behavior

* removed bad prox code
This commit is contained in:
ykeara
2019-06-14 12:33:56 -05:00
committed by GitHub
parent 8e34e9edca
commit b473f4d7db
32 changed files with 419 additions and 130 deletions
+67 -15
View File
@@ -640,6 +640,11 @@ public struct IVRChaperoneSetup
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HideWorkingSetPreview HideWorkingSetPreview;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _RoomSetupStarting();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RoomSetupStarting RoomSetupStarting;
}
[StructLayout(LayoutKind.Sequential)]
@@ -865,6 +870,16 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsMotionSmoothingEnabled IsMotionSmoothingEnabled;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsMotionSmoothingSupported();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsMotionSmoothingSupported IsMotionSmoothingSupported;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsCurrentSceneFocusAppLoading();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsCurrentSceneFocusAppLoading IsCurrentSceneFocusAppLoading;
}
[StructLayout(LayoutKind.Sequential)]
@@ -1576,9 +1591,14 @@ public struct IVRInput
internal _GetAnalogActionData GetAnalogActionData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetPoseActionData(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
internal delegate EVRInputError _GetPoseActionDataRelativeToNow(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPoseActionData GetPoseActionData;
internal _GetPoseActionDataRelativeToNow GetPoseActionDataRelativeToNow;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetPoseActionDataForNextFrame(ulong action, ETrackingUniverseOrigin eOrigin, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPoseActionDataForNextFrame GetPoseActionDataForNextFrame;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalActionData(ulong action, ref InputSkeletalActionData_t pActionData, uint unActionDataSize);
@@ -1616,7 +1636,7 @@ public struct IVRInput
internal _GetSkeletalBoneData GetSkeletalBoneData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalSummaryData(ulong action, ref VRSkeletalSummaryData_t pSkeletalSummaryData);
internal delegate EVRInputError _GetSkeletalSummaryData(ulong action, EVRSummaryType eSummaryType, ref VRSkeletalSummaryData_t pSkeletalSummaryData);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSkeletalSummaryData GetSkeletalSummaryData;
@@ -2476,6 +2496,10 @@ public class CVRChaperoneSetup
{
FnTable.HideWorkingSetPreview();
}
public void RoomSetupStarting()
{
FnTable.RoomSetupStarting();
}
}
@@ -2687,6 +2711,16 @@ public class CVRCompositor
bool result = FnTable.IsMotionSmoothingEnabled();
return result;
}
public bool IsMotionSmoothingSupported()
{
bool result = FnTable.IsMotionSmoothingSupported();
return result;
}
public bool IsCurrentSceneFocusAppLoading()
{
bool result = FnTable.IsCurrentSceneFocusAppLoading();
return result;
}
}
@@ -3507,9 +3541,14 @@ public class CVRInput
EVRInputError result = FnTable.GetAnalogActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice);
return result;
}
public EVRInputError GetPoseActionData(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
public EVRInputError GetPoseActionDataRelativeToNow(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
{
EVRInputError result = FnTable.GetPoseActionData(action,eOrigin,fPredictedSecondsFromNow,ref pActionData,unActionDataSize,ulRestrictToDevice);
EVRInputError result = FnTable.GetPoseActionDataRelativeToNow(action,eOrigin,fPredictedSecondsFromNow,ref pActionData,unActionDataSize,ulRestrictToDevice);
return result;
}
public EVRInputError GetPoseActionDataForNextFrame(ulong action,ETrackingUniverseOrigin eOrigin,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
{
EVRInputError result = FnTable.GetPoseActionDataForNextFrame(action,eOrigin,ref pActionData,unActionDataSize,ulRestrictToDevice);
return result;
}
public EVRInputError GetSkeletalActionData(ulong action,ref InputSkeletalActionData_t pActionData,uint unActionDataSize)
@@ -3548,9 +3587,9 @@ public class CVRInput
EVRInputError result = FnTable.GetSkeletalBoneData(action,eTransformSpace,eMotionRange,pTransformArray,(uint) pTransformArray.Length);
return result;
}
public EVRInputError GetSkeletalSummaryData(ulong action,ref VRSkeletalSummaryData_t pSkeletalSummaryData)
public EVRInputError GetSkeletalSummaryData(ulong action,EVRSummaryType eSummaryType,ref VRSkeletalSummaryData_t pSkeletalSummaryData)
{
EVRInputError result = FnTable.GetSkeletalSummaryData(action,ref pSkeletalSummaryData);
EVRInputError result = FnTable.GetSkeletalSummaryData(action,eSummaryType,ref pSkeletalSummaryData);
return result;
}
public EVRInputError GetSkeletalBoneDataCompressed(ulong action,EVRSkeletalMotionRange eMotionRange,IntPtr pvCompressedData,uint unCompressedSize,ref uint punRequiredCompressedSize)
@@ -3750,7 +3789,7 @@ public enum ETrackedControllerRole
RightHand = 2,
OptOut = 3,
Treadmill = 4,
Max = 4,
Max = 5,
}
public enum ETrackingUniverseOrigin
{
@@ -3887,6 +3926,9 @@ public enum ETrackedDeviceProperty
Prop_CameraDistortionFunction_Int32_Array = 2072,
Prop_CameraDistortionCoefficients_Float_Array = 2073,
Prop_ExpectedControllerType_String = 2074,
Prop_DisplayAvailableFrameRates_Float_Array = 2080,
Prop_DisplaySupportsMultipleFramerates_Bool = 2081,
Prop_DashboardLayoutPathName_String = 2090,
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
@@ -3934,7 +3976,6 @@ public enum ETrackedDeviceProperty
Prop_HasVirtualDisplayComponent_Bool = 6006,
Prop_HasSpatialAnchorsSupport_Bool = 6007,
Prop_ControllerType_String = 7000,
Prop_LegacyInputProfile_String = 7001,
Prop_ControllerHandSelectionPriority_Int32 = 7002,
Prop_VendorSpecific_Reserved_Start = 10000,
Prop_VendorSpecific_Reserved_End = 10999,
@@ -4074,6 +4115,8 @@ public enum EVREventType
VREvent_ChaperoneSettingsHaveChanged = 803,
VREvent_SeatedZeroPoseReset = 804,
VREvent_ChaperoneFlushCache = 805,
VREvent_ChaperoneRoomSetupStarting = 806,
VREvent_ChaperoneRoomSetupFinished = 807,
VREvent_AudioSettingsHaveChanged = 820,
VREvent_BackgroundSettingHasChanged = 850,
VREvent_CameraSettingsHaveChanged = 851,
@@ -4119,6 +4162,7 @@ public enum EVREventType
VREvent_Compositor_HDCPError = 1414,
VREvent_Compositor_ApplicationNotResponding = 1415,
VREvent_Compositor_ApplicationResumed = 1416,
VREvent_Compositor_OutOfVideoMemory = 1417,
VREvent_TrackedCamera_StartVideoStream = 1500,
VREvent_TrackedCamera_StopVideoStream = 1501,
VREvent_TrackedCamera_PauseVideoStream = 1502,
@@ -4172,9 +4216,9 @@ public enum EVRButtonId
k_EButton_SteamVR_Touchpad = 32,
k_EButton_SteamVR_Trigger = 33,
k_EButton_Dashboard_Back = 2,
k_EButton_Knuckles_A = 2,
k_EButton_Knuckles_B = 1,
k_EButton_Knuckles_JoyStick = 35,
k_EButton_IndexController_A = 2,
k_EButton_IndexController_B = 1,
k_EButton_IndexController_JoyStick = 35,
k_EButton_Max = 64,
}
public enum EVRMouseButton
@@ -4192,7 +4236,6 @@ public enum EShowUIType
{
ShowUI_ControllerBinding = 0,
ShowUI_ManageTrackers = 1,
ShowUI_QuickStart = 2,
ShowUI_Pairing = 3,
ShowUI_Settings = 4,
}
@@ -4385,6 +4428,7 @@ public enum EVRInitError
Init_VRWebHelperStartupFailed = 141,
Init_TrackerManagerInitFailed = 142,
Init_AlreadyRunning = 143,
Init_FailedForVrMonitor = 144,
Driver_Failed = 200,
Driver_Unknown = 201,
Driver_HmdUnknown = 202,
@@ -4397,6 +4441,7 @@ public enum EVRInitError
Driver_TrackedDeviceInterfaceUnknown = 209,
Driver_HmdDriverIdOutOfBounds = 211,
Driver_HmdDisplayMirrored = 212,
Driver_HmdDisplayNotFoundLaptop = 213,
IPC_ServerInitFailed = 300,
IPC_ConnectFailed = 301,
IPC_SharedStateInitFailed = 302,
@@ -4831,6 +4876,11 @@ public enum EVRFingerSplay
Ring_Pinky = 3,
Count = 4,
}
public enum EVRSummaryType
{
FromAnimation = 0,
FromDevice = 1,
}
public enum EVRInputFilterCancelType
{
VRInputFilterCancel_Timers = 0,
@@ -5952,6 +6002,7 @@ public class OpenVR
public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
public const string k_pch_SteamVR_DebugInput = "debugInput";
public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
public const string k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI";
public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
public const string k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling";
@@ -5974,6 +6025,7 @@ public class OpenVR
public const string k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth";
public const string k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
public const string k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2";
public const string k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations";
public const string k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";
public const string k_pch_Lighthouse_NewPairing_Bool = "newPairing";
public const string k_pch_Null_Section = "driver_null";
@@ -6008,7 +6060,7 @@ public class OpenVR
public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
public const string k_pch_Perf_TestData_Float = "perfTestData";
public const string k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling";
public const string k_pch_Perf_GPUProfiling_Bool = "GPUProfiling";
public const string k_pch_CollisionBounds_Section = "collisionBounds";
public const string k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
public const string k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
@@ -6076,7 +6128,7 @@ public class OpenVR
public const uint k_unMaxActionSetNameLength = 64;
public const uint k_unMaxActionOriginCount = 16;
public const uint k_unMaxBoneNameLength = 32;
public const string IVRInput_Version = "IVRInput_005";
public const string IVRInput_Version = "IVRInput_006";
public const ulong k_ulInvalidIOBufferHandle = 0;
public const string IVRIOBuffer_Version = "IVRIOBuffer_002";
public const uint k_ulInvalidSpatialAnchorHandle = 0;