diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so index 95bc2f55..592dd2c1 100755 Binary files a/bin/linux32/libopenvr_api.so and b/bin/linux32/libopenvr_api.so differ diff --git a/bin/linux32/libopenvr_api.so.dbg b/bin/linux32/libopenvr_api.so.dbg index feaafdd6..80c0a20d 100755 Binary files a/bin/linux32/libopenvr_api.so.dbg and b/bin/linux32/libopenvr_api.so.dbg differ diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so index 71306640..d4d628a8 100755 Binary files a/bin/linux64/libopenvr_api.so and b/bin/linux64/libopenvr_api.so differ diff --git a/bin/linux64/libopenvr_api.so.dbg b/bin/linux64/libopenvr_api.so.dbg index 99bedebf..c47bd94c 100755 Binary files a/bin/linux64/libopenvr_api.so.dbg and b/bin/linux64/libopenvr_api.so.dbg differ diff --git a/bin/osx32/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib index b3534221..a62096ff 100755 Binary files a/bin/osx32/libopenvr_api.dylib and b/bin/osx32/libopenvr_api.dylib differ diff --git a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib index 57684cf3..2bab4394 100644 Binary files a/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib and b/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib differ diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll index 94a51bff..05cb0974 100644 Binary files a/bin/win32/openvr_api.dll and b/bin/win32/openvr_api.dll differ diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb index b059445e..c73f94cf 100644 Binary files a/bin/win32/openvr_api.pdb and b/bin/win32/openvr_api.pdb differ diff --git a/bin/win64/openvr_api.dll b/bin/win64/openvr_api.dll index d20a79e4..736677d3 100644 Binary files a/bin/win64/openvr_api.dll and b/bin/win64/openvr_api.dll differ diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb index 368e572f..7373034c 100644 Binary files a/bin/win64/openvr_api.pdb and b/bin/win64/openvr_api.pdb differ diff --git a/headers/openvr.h b/headers/openvr.h index f945dbc1..4ad9486b 100644 --- a/headers/openvr.h +++ b/headers/openvr.h @@ -151,7 +151,7 @@ static const uint32_t k_unMaxDriverDebugResponseSize = 32768; /** Used to pass device IDs to API calls */ typedef uint32_t TrackedDeviceIndex_t; static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; -static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unMaxTrackedDeviceCount = 64; static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; @@ -219,6 +219,10 @@ static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; +static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; +static const PropertyTypeTag_t k_unActionPropertyTag = 32; +static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; +static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; @@ -267,6 +271,8 @@ enum ETrackedDeviceProperty Prop_ViveSystemButtonFixRequired_Bool = 1033, Prop_ParentDriver_Uint64 = 1034, Prop_ResourceRoot_String = 1035, + Prop_RegisteredDeviceType_String = 1036, + Prop_InputProfileName_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -316,6 +322,12 @@ enum ETrackedDeviceProperty Prop_DisplayDebugMode_Bool = 2044, Prop_GraphicsAdapterLuid_Uint64 = 2045, Prop_DriverProvidedChaperonePath_String = 2048, + Prop_ExpectedTrackingReferenceCount_Int32 = 2049, // expected number of sensors or basestations to reserve UI space for + Prop_ExpectedControllerCount_Int32 = 2050, // expected number of tracked controllers to reserve UI space for + Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded + Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded + Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded + Prop_DoNotApplyPrediction_Bool = 2054, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -350,6 +362,7 @@ enum ETrackedDeviceProperty // Properties that are used by helpers, but are opaque to applications Prop_DisplayHiddenArea_Binary_Start = 5100, Prop_DisplayHiddenArea_Binary_End = 5150, + Prop_ParentContainer = 5151, // Properties that are unique to drivers Prop_UserConfigPath_String = 6000, @@ -383,6 +396,7 @@ enum ETrackedPropertyError TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. TrackedProp_PermissionDenied = 10, TrackedProp_InvalidOperation = 11, + TrackedProp_CannotWriteToWildcards = 12, }; /** Allows the application to control what part of the provided texture will be used in the @@ -481,6 +495,15 @@ enum EVREventType VREvent_ButtonTouch = 202, // data is controller VREvent_ButtonUntouch = 203, // data is controller + VREvent_DualAnalog_Press = 250, // data is dualAnalog + VREvent_DualAnalog_Unpress = 251, // data is dualAnalog + VREvent_DualAnalog_Touch = 252, // data is dualAnalog + VREvent_DualAnalog_Untouch = 253, // data is dualAnalog + VREvent_DualAnalog_Move = 254, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch1 = 255, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch2 = 256, // data is dualAnalog + VREvent_DualAnalog_Cancel = 257, // data is dualAnalog + VREvent_MouseMove = 300, // data is mouse VREvent_MouseButtonDown = 301, // data is mouse VREvent_MouseButtonUp = 302, // data is mouse @@ -502,6 +525,9 @@ enum EVREventType VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + VREvent_ConsoleOpened = 420, + VREvent_ConsoleClosed = 421, + VREvent_OverlayShown = 500, VREvent_OverlayHidden = 501, VREvent_DashboardActivated = 502, @@ -550,13 +576,21 @@ enum EVREventType VREvent_AudioSettingsHaveChanged = 820, - VREvent_BackgroundSettingHasChanged = 850, - VREvent_CameraSettingsHaveChanged = 851, - VREvent_ReprojectionSettingHasChanged = 852, - VREvent_ModelSkinSettingsHaveChanged = 853, - VREvent_EnvironmentSettingsHaveChanged = 854, - VREvent_PowerSettingsHaveChanged = 855, - VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, VREvent_StatusUpdate = 900, @@ -679,7 +713,8 @@ struct VREvent_Scroll_t }; /** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger - is on the touchpad (or just released from it) + is on the touchpad (or just released from it). These events are sent to overlays with the VROverlayFlags_SendVRTouchpadEvents + flag set. **/ struct VREvent_TouchPadMove_t { @@ -796,6 +831,20 @@ struct VREvent_Property_t ETrackedDeviceProperty prop; }; +enum EDualAnalogWhich +{ + k_EDualAnalog_Left = 0, + k_EDualAnalog_Right = 1, +}; + +struct VREvent_DualAnalog_t +{ + float x, y; // coordinates are -1..1 analog values + float transformedX, transformedY; // transformed by the center and radius numbers provided by the overlay + EDualAnalogWhich which; +}; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ typedef union { @@ -819,6 +868,7 @@ typedef union VREvent_EditingCameraSurface_t cameraSurface; VREvent_MessageOverlay_t messageOverlay; VREvent_Property_t property; + VREvent_DualAnalog_t dualAnalog; } VREvent_Data_t; @@ -1068,7 +1118,7 @@ enum EVRInitError VRInitError_Init_RebootingBusy = 137, VRInitError_Init_FirmwareUpdateBusy = 138, VRInitError_Init_FirmwareRecoveryBusy = 139, - + VRInitError_Init_USBServiceBusy = 140, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1102,6 +1152,7 @@ enum EVRInitError VRInitError_Compositor_UnableToCreateDevice = 405, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, @@ -1186,6 +1237,16 @@ typedef uint32_t ScreenshotHandle_t; static const uint32_t k_unScreenshotHandleInvalid = 0; +/** Frame timing data provided by direct mode drivers. */ +struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( DriverDirectMode_FrameTiming ) + uint32_t m_nNumFramePresents; // number of times frame was presented + uint32_t m_nNumMisPresented; // number of times frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out (i.e. compositor missed vsync) + uint32_t m_nReprojectionFlags; +}; + #pragma pack( pop ) // figure out how to import from the VR API dll @@ -1582,6 +1643,8 @@ namespace vr VRApplicationProperty_NewsURL_String = 51, VRApplicationProperty_ImagePath_String = 52, VRApplicationProperty_Source_String = 53, + VRApplicationProperty_ActionManifestPath_String = 54, + VRApplicationProperty_ActionBindingPath_String = 55, VRApplicationProperty_IsDashboardOverlay_Bool = 60, VRApplicationProperty_IsTemplate_Bool = 61, @@ -1835,6 +1898,7 @@ namespace vr static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; //----------------------------------------------------------------------------- // lighthouse keys @@ -1844,6 +1908,7 @@ namespace vr static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; //----------------------------------------------------------------------------- // null keys @@ -2140,6 +2205,14 @@ enum EVRCompositorError VRCompositorError_InvalidBounds = 109, }; +/** Timing mode passed to SetExplicitTimingMode(); see that function for documentation */ +enum EVRCompositorTimingMode +{ + VRCompositorTimingMode_Implicit = 0, + VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff = 1, + VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, +}; + const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, @@ -2400,11 +2473,11 @@ class IVRCompositor * Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame. * * Avoiding WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired, - * the application *MUST* call PostPresentHandoff itself prior to WaitGetPoses. If SetExplicitTimingMode is true and the - * application calls PostPresentHandoff, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff + * the application should set the timing mode to Explicit_ApplicationPerformsPostPresentHandoff and *MUST* call PostPresentHandoff + * itself. If these conditions are met, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff * and SubmitExplicitTimingData will access the queue, so only WaitGetPoses becomes safe for accessing the queue from another * thread. */ - virtual void SetExplicitTimingMode( bool bExplicitTimingMode ) = 0; + virtual void SetExplicitTimingMode( EVRCompositorTimingMode eTimingMode ) = 0; /** [ Vulkan/D3D12 Only ] * Submit explicit timing data. When SetExplicitTimingMode is true, this must be called immediately before @@ -2415,7 +2488,7 @@ class IVRCompositor virtual EVRCompositorError SubmitExplicitTimingData() = 0; }; -static const char * const IVRCompositor_Version = "IVRCompositor_021"; +static const char * const IVRCompositor_Version = "IVRCompositor_022"; } // namespace vr @@ -2531,6 +2604,7 @@ namespace vr { VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + VROverlayInputMethod_DualAnalog = 2, // Analog inputs from tracked controllers are turned into DualAnalog events }; /** Allows the caller to figure out which overlay transform getter to call. */ @@ -2896,6 +2970,12 @@ namespace vr * neighbor in that direction */ virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + /** Sets the analog input to Dual Analog coordinate scale for the specified overlay. */ + virtual EVROverlayError SetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, const HmdVector2_t & vCenter, float fRadius ) = 0; + + /** Gets the analog input to Dual Analog coordinate scale for the specified overlay. */ + virtual EVROverlayError GetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t *pvCenter, float *pfRadius ) = 0; + // --------------------------------------------- // Overlay texture methods // --------------------------------------------- @@ -3005,7 +3085,7 @@ namespace vr virtual void CloseMessageOverlay() = 0; }; - static const char * const IVROverlay_Version = "IVROverlay_016"; + static const char * const IVROverlay_Version = "IVROverlay_017"; } // namespace vr diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs index 393a9171..001f8933 100644 --- a/headers/openvr_api.cs +++ b/headers/openvr_api.cs @@ -846,7 +846,7 @@ public struct IVRCompositor internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - internal delegate void _SetExplicitTimingMode(bool bExplicitTimingMode); + internal delegate void _SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode); [MarshalAs(UnmanagedType.FunctionPtr)] internal _SetExplicitTimingMode SetExplicitTimingMode; @@ -1145,6 +1145,16 @@ public struct IVROverlay [MarshalAs(UnmanagedType.FunctionPtr)] internal _MoveGamepadFocusToNeighbor MoveGamepadFocusToNeighbor; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _SetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, IntPtr vCenter, float fRadius); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _SetOverlayDualAnalogTransform SetOverlayDualAnalogTransform; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate EVROverlayError _GetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, ref float pfRadius); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _GetOverlayDualAnalogTransform GetOverlayDualAnalogTransform; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture); [MarshalAs(UnmanagedType.FunctionPtr)] @@ -2460,9 +2470,9 @@ public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,System.Text uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysicalDevice,pchValue,unBufferSize); return result; } - public void SetExplicitTimingMode(bool bExplicitTimingMode) + public void SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode) { - FnTable.SetExplicitTimingMode(bExplicitTimingMode); + FnTable.SetExplicitTimingMode(eTimingMode); } public EVRCompositorError SubmitExplicitTimingData() { @@ -2807,6 +2817,17 @@ public EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDirection,u EVROverlayError result = FnTable.MoveGamepadFocusToNeighbor(eDirection,ulFrom); return result; } + public EVROverlayError SetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,IntPtr vCenter,float fRadius) + { + EVROverlayError result = FnTable.SetOverlayDualAnalogTransform(ulOverlay,eWhich,vCenter,fRadius); + return result; + } + public EVROverlayError GetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,ref float pfRadius) + { + pfRadius = 0; + EVROverlayError result = FnTable.GetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,ref pfRadius); + return result; + } public EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture) { EVROverlayError result = FnTable.SetOverlayTexture(ulOverlayHandle,ref pTexture); @@ -3336,6 +3357,8 @@ public enum ETrackedDeviceProperty Prop_ViveSystemButtonFixRequired_Bool = 1033, Prop_ParentDriver_Uint64 = 1034, Prop_ResourceRoot_String = 1035, + Prop_RegisteredDeviceType_String = 1036, + Prop_InputProfileName_String = 1037, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -3383,6 +3406,12 @@ public enum ETrackedDeviceProperty Prop_DisplayDebugMode_Bool = 2044, Prop_GraphicsAdapterLuid_Uint64 = 2045, Prop_DriverProvidedChaperonePath_String = 2048, + Prop_ExpectedTrackingReferenceCount_Int32 = 2049, + Prop_ExpectedControllerCount_Int32 = 2050, + Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, + Prop_NamedIconPathControllerRightDeviceOff_String = 2052, + Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, + Prop_DoNotApplyPrediction_Bool = 2054, Prop_AttachedDeviceId_String = 3000, Prop_SupportedButtons_Uint64 = 3001, Prop_Axis0Type_Int32 = 3002, @@ -3409,6 +3438,7 @@ public enum ETrackedDeviceProperty Prop_NamedIconPathDeviceAlertLow_String = 5008, Prop_DisplayHiddenArea_Binary_Start = 5100, Prop_DisplayHiddenArea_Binary_End = 5150, + Prop_ParentContainer = 5151, Prop_UserConfigPath_String = 6000, Prop_InstallPath_String = 6001, Prop_HasDisplayComponent_Bool = 6002, @@ -3433,6 +3463,7 @@ public enum ETrackedPropertyError TrackedProp_NotYetAvailable = 9, TrackedProp_PermissionDenied = 10, TrackedProp_InvalidOperation = 11, + TrackedProp_CannotWriteToWildcards = 12, } public enum EVRSubmitFlags { @@ -3475,6 +3506,14 @@ public enum EVREventType VREvent_ButtonUnpress = 201, VREvent_ButtonTouch = 202, VREvent_ButtonUntouch = 203, + VREvent_DualAnalog_Press = 250, + VREvent_DualAnalog_Unpress = 251, + VREvent_DualAnalog_Touch = 252, + VREvent_DualAnalog_Untouch = 253, + VREvent_DualAnalog_Move = 254, + VREvent_DualAnalog_ModeSwitch1 = 255, + VREvent_DualAnalog_ModeSwitch2 = 256, + VREvent_DualAnalog_Cancel = 257, VREvent_MouseMove = 300, VREvent_MouseButtonDown = 301, VREvent_MouseButtonUp = 302, @@ -3493,6 +3532,8 @@ public enum EVREventType VREvent_SceneApplicationSecondaryRenderingStarted = 407, VREvent_HideRenderModels = 410, VREvent_ShowRenderModels = 411, + VREvent_ConsoleOpened = 420, + VREvent_ConsoleClosed = 421, VREvent_OverlayShown = 500, VREvent_OverlayHidden = 501, VREvent_DashboardActivated = 502, @@ -3540,6 +3581,14 @@ public enum EVREventType VREvent_EnvironmentSettingsHaveChanged = 854, VREvent_PowerSettingsHaveChanged = 855, VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, VREvent_StatusUpdate = 900, VREvent_MCImageUpdated = 1000, VREvent_FirmwareUpdateStarted = 1100, @@ -3607,6 +3656,11 @@ public enum EVRMouseButton Right = 2, Middle = 4, } +public enum EDualAnalogWhich +{ + k_EDualAnalog_Left = 0, + k_EDualAnalog_Right = 1, +} public enum EHiddenAreaMeshType { k_eHiddenAreaMesh_Standard = 0, @@ -3729,6 +3783,7 @@ public enum EVRInitError Init_RebootingBusy = 137, Init_FirmwareUpdateBusy = 138, Init_FirmwareRecoveryBusy = 139, + Init_USBServiceBusy = 140, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -3757,6 +3812,7 @@ public enum EVRInitError Compositor_ScreenshotsInitFailed = 404, Compositor_UnableToCreateDevice = 405, VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VendorSpecific_WindowsNotInDevMode = 1001, VendorSpecific_HmdFound_CantOpenDevice = 1101, VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, VendorSpecific_HmdFound_NoStoredConfig = 1103, @@ -3849,6 +3905,8 @@ public enum EVRApplicationProperty NewsURL_String = 51, ImagePath_String = 52, Source_String = 53, + ActionManifestPath_String = 54, + ActionBindingPath_String = 55, IsDashboardOverlay_Bool = 60, IsTemplate_Bool = 61, IsInstanced_Bool = 62, @@ -3900,10 +3958,17 @@ public enum EVRCompositorError AlreadySubmitted = 108, InvalidBounds = 109, } +public enum EVRCompositorTimingMode +{ + Implicit = 0, + Explicit_RuntimePerformsPostPresentHandoff = 1, + Explicit_ApplicationPerformsPostPresentHandoff = 2, +} public enum VROverlayInputMethod { None = 0, Mouse = 1, + DualAnalog = 2, } public enum VROverlayTransformType { @@ -4294,6 +4359,14 @@ public enum EVRScreenshotError public ulong container; public ETrackedDeviceProperty prop; } +[StructLayout(LayoutKind.Sequential)] public struct VREvent_DualAnalog_t +{ + public float x; + public float y; + public float transformedX; + public float transformedY; + public EDualAnalogWhich which; +} [StructLayout(LayoutKind.Sequential)] public struct VREvent_t { public uint eventType; @@ -4406,6 +4479,14 @@ public void Unpack(ref VRControllerState_t unpacked) public uint nFrameSequence; public TrackedDevicePose_t standingTrackedDevicePose; } +[StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming +{ + public uint m_nSize; + public uint m_nNumFramePresents; + public uint m_nNumMisPresented; + public uint m_nNumDroppedFrames; + public uint m_nReprojectionFlags; +} [StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t { public IntPtr pchKey; // const char * @@ -4633,7 +4714,7 @@ public static uint GetInitToken() public const uint k_nDriverNone = 4294967295; public const uint k_unMaxDriverDebugResponseSize = 32768; public const uint k_unTrackedDeviceIndex_Hmd = 0; - public const uint k_unMaxTrackedDeviceCount = 16; + public const uint k_unMaxTrackedDeviceCount = 64; public const uint k_unTrackedDeviceIndexOther = 4294967294; public const uint k_unTrackedDeviceIndexInvalid = 4294967295; public const ulong k_ulInvalidPropertyContainer = 0; @@ -4648,6 +4729,10 @@ public static uint GetInitToken() public const uint k_unHmdVector3PropertyTag = 22; public const uint k_unHmdVector4PropertyTag = 23; public const uint k_unHiddenAreaPropertyTag = 30; + public const uint k_unPathHandleInfoTag = 31; + public const uint k_unActionPropertyTag = 32; + public const uint k_unInputValuePropertyTag = 33; + public const uint k_unWildcardPropertyTag = 34; public const uint k_unOpenVRInternalReserved_Start = 1000; public const uint k_unOpenVRInternalReserved_End = 10000; public const uint k_unMaxPropertyStringSize = 32768; @@ -4663,12 +4748,12 @@ public static uint GetInitToken() public const string IVRApplications_Version = "IVRApplications_006"; public const string IVRChaperone_Version = "IVRChaperone_003"; public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; - public const string IVRCompositor_Version = "IVRCompositor_021"; + public const string IVRCompositor_Version = "IVRCompositor_022"; public const uint k_unVROverlayMaxKeyLength = 128; public const uint k_unVROverlayMaxNameLength = 128; public const uint k_unMaxOverlayCount = 64; public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; - public const string IVROverlay_Version = "IVROverlay_016"; + public const string IVROverlay_Version = "IVROverlay_017"; public const string k_pch_Controller_Component_GDC2015 = "gdc2015"; public const string k_pch_Controller_Component_Base = "base"; public const string k_pch_Controller_Component_Tip = "tip"; @@ -4723,12 +4808,14 @@ public static uint GetInitToken() public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; public const string k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; public const string k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + public const string k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; public const string k_pch_Lighthouse_Section = "driver_lighthouse"; public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; public const string k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + public const string k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; public const string k_pch_Null_Section = "driver_null"; public const string k_pch_Null_SerialNumber_String = "serialNumber"; public const string k_pch_Null_ModelNumber_String = "modelNumber"; diff --git a/headers/openvr_api.json b/headers/openvr_api.json index 8fa11a63..e5aa93d5 100644 --- a/headers/openvr_api.json +++ b/headers/openvr_api.json @@ -111,6 +111,8 @@ ,{"name": "Prop_ViveSystemButtonFixRequired_Bool","value": "1033"} ,{"name": "Prop_ParentDriver_Uint64","value": "1034"} ,{"name": "Prop_ResourceRoot_String","value": "1035"} + ,{"name": "Prop_RegisteredDeviceType_String","value": "1036"} + ,{"name": "Prop_InputProfileName_String","value": "1037"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -158,6 +160,12 @@ ,{"name": "Prop_DisplayDebugMode_Bool","value": "2044"} ,{"name": "Prop_GraphicsAdapterLuid_Uint64","value": "2045"} ,{"name": "Prop_DriverProvidedChaperonePath_String","value": "2048"} + ,{"name": "Prop_ExpectedTrackingReferenceCount_Int32","value": "2049"} + ,{"name": "Prop_ExpectedControllerCount_Int32","value": "2050"} + ,{"name": "Prop_NamedIconPathControllerLeftDeviceOff_String","value": "2051"} + ,{"name": "Prop_NamedIconPathControllerRightDeviceOff_String","value": "2052"} + ,{"name": "Prop_NamedIconPathTrackingReferenceDeviceOff_String","value": "2053"} + ,{"name": "Prop_DoNotApplyPrediction_Bool","value": "2054"} ,{"name": "Prop_AttachedDeviceId_String","value": "3000"} ,{"name": "Prop_SupportedButtons_Uint64","value": "3001"} ,{"name": "Prop_Axis0Type_Int32","value": "3002"} @@ -184,6 +192,7 @@ ,{"name": "Prop_NamedIconPathDeviceAlertLow_String","value": "5008"} ,{"name": "Prop_DisplayHiddenArea_Binary_Start","value": "5100"} ,{"name": "Prop_DisplayHiddenArea_Binary_End","value": "5150"} + ,{"name": "Prop_ParentContainer","value": "5151"} ,{"name": "Prop_UserConfigPath_String","value": "6000"} ,{"name": "Prop_InstallPath_String","value": "6001"} ,{"name": "Prop_HasDisplayComponent_Bool","value": "6002"} @@ -207,6 +216,7 @@ ,{"name": "TrackedProp_NotYetAvailable","value": "9"} ,{"name": "TrackedProp_PermissionDenied","value": "10"} ,{"name": "TrackedProp_InvalidOperation","value": "11"} + ,{"name": "TrackedProp_CannotWriteToWildcards","value": "12"} ]} , {"enumname": "vr::EVRSubmitFlags","values": [ {"name": "Submit_Default","value": "0"} @@ -246,6 +256,14 @@ ,{"name": "VREvent_ButtonUnpress","value": "201"} ,{"name": "VREvent_ButtonTouch","value": "202"} ,{"name": "VREvent_ButtonUntouch","value": "203"} + ,{"name": "VREvent_DualAnalog_Press","value": "250"} + ,{"name": "VREvent_DualAnalog_Unpress","value": "251"} + ,{"name": "VREvent_DualAnalog_Touch","value": "252"} + ,{"name": "VREvent_DualAnalog_Untouch","value": "253"} + ,{"name": "VREvent_DualAnalog_Move","value": "254"} + ,{"name": "VREvent_DualAnalog_ModeSwitch1","value": "255"} + ,{"name": "VREvent_DualAnalog_ModeSwitch2","value": "256"} + ,{"name": "VREvent_DualAnalog_Cancel","value": "257"} ,{"name": "VREvent_MouseMove","value": "300"} ,{"name": "VREvent_MouseButtonDown","value": "301"} ,{"name": "VREvent_MouseButtonUp","value": "302"} @@ -264,6 +282,8 @@ ,{"name": "VREvent_SceneApplicationSecondaryRenderingStarted","value": "407"} ,{"name": "VREvent_HideRenderModels","value": "410"} ,{"name": "VREvent_ShowRenderModels","value": "411"} + ,{"name": "VREvent_ConsoleOpened","value": "420"} + ,{"name": "VREvent_ConsoleClosed","value": "421"} ,{"name": "VREvent_OverlayShown","value": "500"} ,{"name": "VREvent_OverlayHidden","value": "501"} ,{"name": "VREvent_DashboardActivated","value": "502"} @@ -311,6 +331,14 @@ ,{"name": "VREvent_EnvironmentSettingsHaveChanged","value": "854"} ,{"name": "VREvent_PowerSettingsHaveChanged","value": "855"} ,{"name": "VREvent_EnableHomeAppSettingsHaveChanged","value": "856"} + ,{"name": "VREvent_SteamVRSectionSettingChanged","value": "857"} + ,{"name": "VREvent_LighthouseSectionSettingChanged","value": "858"} + ,{"name": "VREvent_NullSectionSettingChanged","value": "859"} + ,{"name": "VREvent_UserInterfaceSectionSettingChanged","value": "860"} + ,{"name": "VREvent_NotificationsSectionSettingChanged","value": "861"} + ,{"name": "VREvent_KeyboardSectionSettingChanged","value": "862"} + ,{"name": "VREvent_PerfSectionSettingChanged","value": "863"} + ,{"name": "VREvent_DashboardSectionSettingChanged","value": "864"} ,{"name": "VREvent_StatusUpdate","value": "900"} ,{"name": "VREvent_MCImageUpdated","value": "1000"} ,{"name": "VREvent_FirmwareUpdateStarted","value": "1100"} @@ -375,6 +403,10 @@ ,{"name": "VRMouseButton_Right","value": "2"} ,{"name": "VRMouseButton_Middle","value": "4"} ]} +, {"enumname": "vr::EDualAnalogWhich","values": [ + {"name": "k_EDualAnalog_Left","value": "0"} + ,{"name": "k_EDualAnalog_Right","value": "1"} +]} , {"enumname": "vr::EHiddenAreaMeshType","values": [ {"name": "k_eHiddenAreaMesh_Standard","value": "0"} ,{"name": "k_eHiddenAreaMesh_Inverse","value": "1"} @@ -488,6 +520,7 @@ ,{"name": "VRInitError_Init_RebootingBusy","value": "137"} ,{"name": "VRInitError_Init_FirmwareUpdateBusy","value": "138"} ,{"name": "VRInitError_Init_FirmwareRecoveryBusy","value": "139"} + ,{"name": "VRInitError_Init_USBServiceBusy","value": "140"} ,{"name": "VRInitError_Driver_Failed","value": "200"} ,{"name": "VRInitError_Driver_Unknown","value": "201"} ,{"name": "VRInitError_Driver_HmdUnknown","value": "202"} @@ -516,6 +549,7 @@ ,{"name": "VRInitError_Compositor_ScreenshotsInitFailed","value": "404"} ,{"name": "VRInitError_Compositor_UnableToCreateDevice","value": "405"} ,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"} + ,{"name": "VRInitError_VendorSpecific_WindowsNotInDevMode","value": "1001"} ,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"} ,{"name": "VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart","value": "1102"} ,{"name": "VRInitError_VendorSpecific_HmdFound_NoStoredConfig","value": "1103"} @@ -602,6 +636,8 @@ ,{"name": "VRApplicationProperty_NewsURL_String","value": "51"} ,{"name": "VRApplicationProperty_ImagePath_String","value": "52"} ,{"name": "VRApplicationProperty_Source_String","value": "53"} + ,{"name": "VRApplicationProperty_ActionManifestPath_String","value": "54"} + ,{"name": "VRApplicationProperty_ActionBindingPath_String","value": "55"} ,{"name": "VRApplicationProperty_IsDashboardOverlay_Bool","value": "60"} ,{"name": "VRApplicationProperty_IsTemplate_Bool","value": "61"} ,{"name": "VRApplicationProperty_IsInstanced_Bool","value": "62"} @@ -648,9 +684,15 @@ ,{"name": "VRCompositorError_AlreadySubmitted","value": "108"} ,{"name": "VRCompositorError_InvalidBounds","value": "109"} ]} +, {"enumname": "vr::EVRCompositorTimingMode","values": [ + {"name": "VRCompositorTimingMode_Implicit","value": "0"} + ,{"name": "VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff","value": "1"} + ,{"name": "VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff","value": "2"} +]} , {"enumname": "vr::VROverlayInputMethod","values": [ {"name": "VROverlayInputMethod_None","value": "0"} ,{"name": "VROverlayInputMethod_Mouse","value": "1"} + ,{"name": "VROverlayInputMethod_DualAnalog","value": "2"} ]} , {"enumname": "vr::VROverlayTransformType","values": [ {"name": "VROverlayTransform_Absolute","value": "0"} @@ -763,7 +805,7 @@ ,{ "constname": "k_unTrackedDeviceIndex_Hmd","consttype": "const uint32_t", "constval": "0"} ,{ - "constname": "k_unMaxTrackedDeviceCount","consttype": "const uint32_t", "constval": "16"} + "constname": "k_unMaxTrackedDeviceCount","consttype": "const uint32_t", "constval": "64"} ,{ "constname": "k_unTrackedDeviceIndexOther","consttype": "const uint32_t", "constval": "4294967294"} ,{ @@ -792,6 +834,14 @@ "constname": "k_unHmdVector4PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "23"} ,{ "constname": "k_unHiddenAreaPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "30"} +,{ + "constname": "k_unPathHandleInfoTag","consttype": "const PropertyTypeTag_t", "constval": "31"} +,{ + "constname": "k_unActionPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "32"} +,{ + "constname": "k_unInputValuePropertyTag","consttype": "const PropertyTypeTag_t", "constval": "33"} +,{ + "constname": "k_unWildcardPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "34"} ,{ "constname": "k_unOpenVRInternalReserved_Start","consttype": "const PropertyTypeTag_t", "constval": "1000"} ,{ @@ -823,7 +873,7 @@ ,{ "constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_005"} ,{ - "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_021"} + "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_022"} ,{ "constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"} ,{ @@ -833,7 +883,7 @@ ,{ "constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"} ,{ - "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_016"} + "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_017"} ,{ "constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"} ,{ @@ -942,6 +992,8 @@ "constname": "k_pch_SteamVR_AllowSupersampleFiltering_Bool","consttype": "const char *const", "constval": "allowSupersampleFiltering"} ,{ "constname": "k_pch_SteamVR_EnableLinuxVulkanAsync_Bool","consttype": "const char *const", "constval": "enableLinuxVulkanAsync"} +,{ + "constname": "k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool","consttype": "const char *const", "constval": "haveStartedTutorialForNativeChaperoneDriver"} ,{ "constname": "k_pch_Lighthouse_Section","consttype": "const char *const", "constval": "driver_lighthouse"} ,{ @@ -954,6 +1006,8 @@ "constname": "k_pch_Lighthouse_PrimaryBasestation_Int32","consttype": "const char *const", "constval": "primarybasestation"} ,{ "constname": "k_pch_Lighthouse_DBHistory_Bool","consttype": "const char *const", "constval": "dbhistory"} +,{ + "constname": "k_pch_Lighthouse_EnableBluetooth_Bool","consttype": "const char *const", "constval": "enableBluetooth"} ,{ "constname": "k_pch_Null_Section","consttype": "const char *const", "constval": "driver_null"} ,{ @@ -1230,6 +1284,12 @@ ,{"struct": "vr::VREvent_Property_t","fields": [ { "fieldname": "container", "fieldtype": "PropertyContainerHandle_t"}, { "fieldname": "prop", "fieldtype": "enum vr::ETrackedDeviceProperty"}]} +,{"struct": "vr::VREvent_DualAnalog_t","fields": [ +{ "fieldname": "x", "fieldtype": "float"}, +{ "fieldname": "y", "fieldtype": "float"}, +{ "fieldname": "transformedX", "fieldtype": "float"}, +{ "fieldname": "transformedY", "fieldtype": "float"}, +{ "fieldname": "which", "fieldtype": "enum vr::EDualAnalogWhich"}]} ,{"struct": "vr::(anonymous)","fields": [ { "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"}, { "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"}, @@ -1250,7 +1310,8 @@ { "fieldname": "applicationLaunch", "fieldtype": "struct vr::VREvent_ApplicationLaunch_t"}, { "fieldname": "cameraSurface", "fieldtype": "struct vr::VREvent_EditingCameraSurface_t"}, { "fieldname": "messageOverlay", "fieldtype": "struct vr::VREvent_MessageOverlay_t"}, -{ "fieldname": "property", "fieldtype": "struct vr::VREvent_Property_t"}]} +{ "fieldname": "property", "fieldtype": "struct vr::VREvent_Property_t"}, +{ "fieldname": "dualAnalog", "fieldtype": "struct vr::VREvent_DualAnalog_t"}]} ,{"struct": "vr::VREvent_t","fields": [ { "fieldname": "eventType", "fieldtype": "uint32_t"}, { "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, @@ -1289,6 +1350,12 @@ { "fieldname": "nBytesPerPixel", "fieldtype": "uint32_t"}, { "fieldname": "nFrameSequence", "fieldtype": "uint32_t"}, { "fieldname": "standingTrackedDevicePose", "fieldtype": "struct vr::TrackedDevicePose_t"}]} +,{"struct": "vr::DriverDirectMode_FrameTiming","fields": [ +{ "fieldname": "m_nSize", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumFramePresents", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumMisPresented", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nNumDroppedFrames", "fieldtype": "uint32_t"}, +{ "fieldname": "m_nReprojectionFlags", "fieldtype": "uint32_t"}]} ,{"struct": "vr::AppOverrideKeys_t","fields": [ { "fieldname": "pchKey", "fieldtype": "const char *"}, { "fieldname": "pchValue", "fieldtype": "const char *"}]} @@ -2737,7 +2804,7 @@ "methodname": "SetExplicitTimingMode", "returntype": "void", "params": [ -{ "paramname": "bExplicitTimingMode" ,"paramtype": "bool"} +{ "paramname": "eTimingMode" ,"paramtype": "vr::EVRCompositorTimingMode"} ] } ,{ @@ -3275,6 +3342,28 @@ { "paramname": "ulFrom" ,"paramtype": "vr::VROverlayHandle_t"} ] } +,{ + "classname": "vr::IVROverlay", + "methodname": "SetOverlayDualAnalogTransform", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"}, +{ "paramname": "vCenter" ,"paramtype": "const struct vr::HmdVector2_t &"}, +{ "paramname": "fRadius" ,"paramtype": "float"} + ] +} +,{ + "classname": "vr::IVROverlay", + "methodname": "GetOverlayDualAnalogTransform", + "returntype": "vr::EVROverlayError", + "params": [ +{ "paramname": "ulOverlay" ,"paramtype": "vr::VROverlayHandle_t"}, +{ "paramname": "eWhich" ,"paramtype": "vr::EDualAnalogWhich"}, +{ "paramname": "pvCenter" ,"paramtype": "struct vr::HmdVector2_t *"}, +{ "paramname": "pfRadius" ,"paramtype": "float *"} + ] +} ,{ "classname": "vr::IVROverlay", "methodname": "SetOverlayTexture", diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h index 50f89586..fb4616aa 100644 --- a/headers/openvr_capi.h +++ b/headers/openvr_capi.h @@ -58,7 +58,7 @@ typedef uint64_t PropertyContainerHandle_t; typedef uint32_t PropertyTypeTag_t; typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; -typedef uint64_t VRInputOriginHandle_t; +typedef uint64_t VRInputValueHandle_t; // OpenVR Constants @@ -66,7 +66,7 @@ typedef uint64_t VRInputOriginHandle_t; static const unsigned int k_nDriverNone = 4294967295; static const unsigned int k_unMaxDriverDebugResponseSize = 32768; static const unsigned int k_unTrackedDeviceIndex_Hmd = 0; -static const unsigned int k_unMaxTrackedDeviceCount = 16; +static const unsigned int k_unMaxTrackedDeviceCount = 64; static const unsigned int k_unTrackedDeviceIndexOther = 4294967294; static const unsigned int k_unTrackedDeviceIndexInvalid = 4294967295; static const unsigned long k_ulInvalidPropertyContainer = 0; @@ -81,6 +81,10 @@ static const unsigned int k_unHmdMatrix44PropertyTag = 21; static const unsigned int k_unHmdVector3PropertyTag = 22; static const unsigned int k_unHmdVector4PropertyTag = 23; static const unsigned int k_unHiddenAreaPropertyTag = 30; +static const unsigned int k_unPathHandleInfoTag = 31; +static const unsigned int k_unActionPropertyTag = 32; +static const unsigned int k_unInputValuePropertyTag = 33; +static const unsigned int k_unWildcardPropertyTag = 34; static const unsigned int k_unOpenVRInternalReserved_Start = 1000; static const unsigned int k_unOpenVRInternalReserved_End = 10000; static const unsigned int k_unMaxPropertyStringSize = 32768; @@ -96,12 +100,12 @@ static const char * k_pch_MimeType_GameTheater = "vr/game_theater"; static const char * IVRApplications_Version = "IVRApplications_006"; static const char * IVRChaperone_Version = "IVRChaperone_003"; static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; -static const char * IVRCompositor_Version = "IVRCompositor_021"; +static const char * IVRCompositor_Version = "IVRCompositor_022"; static const unsigned int k_unVROverlayMaxKeyLength = 128; static const unsigned int k_unVROverlayMaxNameLength = 128; static const unsigned int k_unMaxOverlayCount = 64; static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; -static const char * IVROverlay_Version = "IVROverlay_016"; +static const char * IVROverlay_Version = "IVROverlay_017"; static const char * k_pch_Controller_Component_GDC2015 = "gdc2015"; static const char * k_pch_Controller_Component_Base = "base"; static const char * k_pch_Controller_Component_Tip = "tip"; @@ -156,12 +160,14 @@ static const char * k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; static const char * k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; static const char * k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; static const char * k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; +static const char * k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; static const char * k_pch_Lighthouse_Section = "driver_lighthouse"; static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; static const char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; static const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; +static const char * k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; static const char * k_pch_Null_Section = "driver_null"; static const char * k_pch_Null_SerialNumber_String = "serialNumber"; static const char * k_pch_Null_ModelNumber_String = "modelNumber"; @@ -335,6 +341,8 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_ViveSystemButtonFixRequired_Bool = 1033, ETrackedDeviceProperty_Prop_ParentDriver_Uint64 = 1034, ETrackedDeviceProperty_Prop_ResourceRoot_String = 1035, + ETrackedDeviceProperty_Prop_RegisteredDeviceType_String = 1036, + ETrackedDeviceProperty_Prop_InputProfileName_String = 1037, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -382,6 +390,12 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_DisplayDebugMode_Bool = 2044, ETrackedDeviceProperty_Prop_GraphicsAdapterLuid_Uint64 = 2045, ETrackedDeviceProperty_Prop_DriverProvidedChaperonePath_String = 2048, + ETrackedDeviceProperty_Prop_ExpectedTrackingReferenceCount_Int32 = 2049, + ETrackedDeviceProperty_Prop_ExpectedControllerCount_Int32 = 2050, + ETrackedDeviceProperty_Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, + ETrackedDeviceProperty_Prop_NamedIconPathControllerRightDeviceOff_String = 2052, + ETrackedDeviceProperty_Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, + ETrackedDeviceProperty_Prop_DoNotApplyPrediction_Bool = 2054, ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, @@ -408,6 +422,7 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_NamedIconPathDeviceAlertLow_String = 5008, ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_Start = 5100, ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_End = 5150, + ETrackedDeviceProperty_Prop_ParentContainer = 5151, ETrackedDeviceProperty_Prop_UserConfigPath_String = 6000, ETrackedDeviceProperty_Prop_InstallPath_String = 6001, ETrackedDeviceProperty_Prop_HasDisplayComponent_Bool = 6002, @@ -433,6 +448,7 @@ typedef enum ETrackedPropertyError ETrackedPropertyError_TrackedProp_NotYetAvailable = 9, ETrackedPropertyError_TrackedProp_PermissionDenied = 10, ETrackedPropertyError_TrackedProp_InvalidOperation = 11, + ETrackedPropertyError_TrackedProp_CannotWriteToWildcards = 12, } ETrackedPropertyError; typedef enum EVRSubmitFlags @@ -478,6 +494,14 @@ typedef enum EVREventType EVREventType_VREvent_ButtonUnpress = 201, EVREventType_VREvent_ButtonTouch = 202, EVREventType_VREvent_ButtonUntouch = 203, + EVREventType_VREvent_DualAnalog_Press = 250, + EVREventType_VREvent_DualAnalog_Unpress = 251, + EVREventType_VREvent_DualAnalog_Touch = 252, + EVREventType_VREvent_DualAnalog_Untouch = 253, + EVREventType_VREvent_DualAnalog_Move = 254, + EVREventType_VREvent_DualAnalog_ModeSwitch1 = 255, + EVREventType_VREvent_DualAnalog_ModeSwitch2 = 256, + EVREventType_VREvent_DualAnalog_Cancel = 257, EVREventType_VREvent_MouseMove = 300, EVREventType_VREvent_MouseButtonDown = 301, EVREventType_VREvent_MouseButtonUp = 302, @@ -496,6 +520,8 @@ typedef enum EVREventType EVREventType_VREvent_SceneApplicationSecondaryRenderingStarted = 407, EVREventType_VREvent_HideRenderModels = 410, EVREventType_VREvent_ShowRenderModels = 411, + EVREventType_VREvent_ConsoleOpened = 420, + EVREventType_VREvent_ConsoleClosed = 421, EVREventType_VREvent_OverlayShown = 500, EVREventType_VREvent_OverlayHidden = 501, EVREventType_VREvent_DashboardActivated = 502, @@ -543,6 +569,14 @@ typedef enum EVREventType EVREventType_VREvent_EnvironmentSettingsHaveChanged = 854, EVREventType_VREvent_PowerSettingsHaveChanged = 855, EVREventType_VREvent_EnableHomeAppSettingsHaveChanged = 856, + EVREventType_VREvent_SteamVRSectionSettingChanged = 857, + EVREventType_VREvent_LighthouseSectionSettingChanged = 858, + EVREventType_VREvent_NullSectionSettingChanged = 859, + EVREventType_VREvent_UserInterfaceSectionSettingChanged = 860, + EVREventType_VREvent_NotificationsSectionSettingChanged = 861, + EVREventType_VREvent_KeyboardSectionSettingChanged = 862, + EVREventType_VREvent_PerfSectionSettingChanged = 863, + EVREventType_VREvent_DashboardSectionSettingChanged = 864, EVREventType_VREvent_StatusUpdate = 900, EVREventType_VREvent_MCImageUpdated = 1000, EVREventType_VREvent_FirmwareUpdateStarted = 1100, @@ -614,6 +648,12 @@ typedef enum EVRMouseButton EVRMouseButton_VRMouseButton_Middle = 4, } EVRMouseButton; +typedef enum EDualAnalogWhich +{ + EDualAnalogWhich_k_EDualAnalog_Left = 0, + EDualAnalogWhich_k_EDualAnalog_Right = 1, +} EDualAnalogWhich; + typedef enum EHiddenAreaMeshType { EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard = 0, @@ -744,6 +784,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_Init_RebootingBusy = 137, EVRInitError_VRInitError_Init_FirmwareUpdateBusy = 138, EVRInitError_VRInitError_Init_FirmwareRecoveryBusy = 139, + EVRInitError_VRInitError_Init_USBServiceBusy = 140, EVRInitError_VRInitError_Driver_Failed = 200, EVRInitError_VRInitError_Driver_Unknown = 201, EVRInitError_VRInitError_Driver_HmdUnknown = 202, @@ -772,6 +813,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_Compositor_ScreenshotsInitFailed = 404, EVRInitError_VRInitError_Compositor_UnableToCreateDevice = 405, EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, @@ -870,6 +912,8 @@ typedef enum EVRApplicationProperty EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51, EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52, EVRApplicationProperty_VRApplicationProperty_Source_String = 53, + EVRApplicationProperty_VRApplicationProperty_ActionManifestPath_String = 54, + EVRApplicationProperty_VRApplicationProperty_ActionBindingPath_String = 55, EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60, EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61, EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62, @@ -927,10 +971,18 @@ typedef enum EVRCompositorError EVRCompositorError_VRCompositorError_InvalidBounds = 109, } EVRCompositorError; +typedef enum EVRCompositorTimingMode +{ + EVRCompositorTimingMode_VRCompositorTimingMode_Implicit = 0, + EVRCompositorTimingMode_VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff = 1, + EVRCompositorTimingMode_VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, +} EVRCompositorTimingMode; + typedef enum VROverlayInputMethod { VROverlayInputMethod_None = 0, VROverlayInputMethod_Mouse = 1, + VROverlayInputMethod_DualAnalog = 2, } VROverlayInputMethod; typedef enum VROverlayTransformType @@ -1335,6 +1387,15 @@ typedef struct VREvent_Property_t enum ETrackedDeviceProperty prop; } VREvent_Property_t; +typedef struct VREvent_DualAnalog_t +{ + float x; + float y; + float transformedX; + float transformedY; + enum EDualAnalogWhich which; +} VREvent_DualAnalog_t; + typedef struct HiddenAreaMesh_t { struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t * @@ -1383,6 +1444,15 @@ typedef struct CameraVideoStreamFrameHeader_t struct TrackedDevicePose_t standingTrackedDevicePose; } CameraVideoStreamFrameHeader_t; +typedef struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; + uint32_t m_nNumFramePresents; + uint32_t m_nNumMisPresented; + uint32_t m_nNumDroppedFrames; + uint32_t m_nReprojectionFlags; +} DriverDirectMode_FrameTiming; + typedef struct AppOverrideKeys_t { char * pchKey; // const char * @@ -1769,7 +1839,7 @@ struct VR_IVRCompositor_FnTable void (OPENVR_FNTABLE_CALLTYPE *UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize); uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanDeviceExtensionsRequired)(struct VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize); - void (OPENVR_FNTABLE_CALLTYPE *SetExplicitTimingMode)(bool bExplicitTimingMode); + void (OPENVR_FNTABLE_CALLTYPE *SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode); EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SubmitExplicitTimingData)(); }; @@ -1832,6 +1902,8 @@ struct VR_IVROverlay_FnTable EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetGamepadFocusOverlay)(VROverlayHandle_t ulNewFocusOverlay); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *MoveGamepadFocusToNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t & vCenter, float fRadius); + EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t * pvCenter, float * pfRadius); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, struct Texture_t * pTexture); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle); EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth); diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h index 7ab997e2..e032bcac 100644 --- a/headers/openvr_driver.h +++ b/headers/openvr_driver.h @@ -151,7 +151,7 @@ static const uint32_t k_unMaxDriverDebugResponseSize = 32768; /** Used to pass device IDs to API calls */ typedef uint32_t TrackedDeviceIndex_t; static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; -static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unMaxTrackedDeviceCount = 64; static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; @@ -219,6 +219,10 @@ static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; +static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; +static const PropertyTypeTag_t k_unActionPropertyTag = 32; +static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; +static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; @@ -267,6 +271,8 @@ enum ETrackedDeviceProperty Prop_ViveSystemButtonFixRequired_Bool = 1033, Prop_ParentDriver_Uint64 = 1034, Prop_ResourceRoot_String = 1035, + Prop_RegisteredDeviceType_String = 1036, + Prop_InputProfileName_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -316,6 +322,12 @@ enum ETrackedDeviceProperty Prop_DisplayDebugMode_Bool = 2044, Prop_GraphicsAdapterLuid_Uint64 = 2045, Prop_DriverProvidedChaperonePath_String = 2048, + Prop_ExpectedTrackingReferenceCount_Int32 = 2049, // expected number of sensors or basestations to reserve UI space for + Prop_ExpectedControllerCount_Int32 = 2050, // expected number of tracked controllers to reserve UI space for + Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded + Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded + Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded + Prop_DoNotApplyPrediction_Bool = 2054, // Properties that are unique to TrackedDeviceClass_Controller Prop_AttachedDeviceId_String = 3000, @@ -350,6 +362,7 @@ enum ETrackedDeviceProperty // Properties that are used by helpers, but are opaque to applications Prop_DisplayHiddenArea_Binary_Start = 5100, Prop_DisplayHiddenArea_Binary_End = 5150, + Prop_ParentContainer = 5151, // Properties that are unique to drivers Prop_UserConfigPath_String = 6000, @@ -383,6 +396,7 @@ enum ETrackedPropertyError TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. TrackedProp_PermissionDenied = 10, TrackedProp_InvalidOperation = 11, + TrackedProp_CannotWriteToWildcards = 12, }; /** Allows the application to control what part of the provided texture will be used in the @@ -481,6 +495,15 @@ enum EVREventType VREvent_ButtonTouch = 202, // data is controller VREvent_ButtonUntouch = 203, // data is controller + VREvent_DualAnalog_Press = 250, // data is dualAnalog + VREvent_DualAnalog_Unpress = 251, // data is dualAnalog + VREvent_DualAnalog_Touch = 252, // data is dualAnalog + VREvent_DualAnalog_Untouch = 253, // data is dualAnalog + VREvent_DualAnalog_Move = 254, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch1 = 255, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch2 = 256, // data is dualAnalog + VREvent_DualAnalog_Cancel = 257, // data is dualAnalog + VREvent_MouseMove = 300, // data is mouse VREvent_MouseButtonDown = 301, // data is mouse VREvent_MouseButtonUp = 302, // data is mouse @@ -502,6 +525,9 @@ enum EVREventType VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + VREvent_ConsoleOpened = 420, + VREvent_ConsoleClosed = 421, + VREvent_OverlayShown = 500, VREvent_OverlayHidden = 501, VREvent_DashboardActivated = 502, @@ -550,13 +576,21 @@ enum EVREventType VREvent_AudioSettingsHaveChanged = 820, - VREvent_BackgroundSettingHasChanged = 850, - VREvent_CameraSettingsHaveChanged = 851, - VREvent_ReprojectionSettingHasChanged = 852, - VREvent_ModelSkinSettingsHaveChanged = 853, - VREvent_EnvironmentSettingsHaveChanged = 854, - VREvent_PowerSettingsHaveChanged = 855, - VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, VREvent_StatusUpdate = 900, @@ -679,7 +713,8 @@ struct VREvent_Scroll_t }; /** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger - is on the touchpad (or just released from it) + is on the touchpad (or just released from it). These events are sent to overlays with the VROverlayFlags_SendVRTouchpadEvents + flag set. **/ struct VREvent_TouchPadMove_t { @@ -796,6 +831,20 @@ struct VREvent_Property_t ETrackedDeviceProperty prop; }; +enum EDualAnalogWhich +{ + k_EDualAnalog_Left = 0, + k_EDualAnalog_Right = 1, +}; + +struct VREvent_DualAnalog_t +{ + float x, y; // coordinates are -1..1 analog values + float transformedX, transformedY; // transformed by the center and radius numbers provided by the overlay + EDualAnalogWhich which; +}; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ typedef union { @@ -819,6 +868,7 @@ typedef union VREvent_EditingCameraSurface_t cameraSurface; VREvent_MessageOverlay_t messageOverlay; VREvent_Property_t property; + VREvent_DualAnalog_t dualAnalog; } VREvent_Data_t; @@ -1068,7 +1118,7 @@ enum EVRInitError VRInitError_Init_RebootingBusy = 137, VRInitError_Init_FirmwareUpdateBusy = 138, VRInitError_Init_FirmwareRecoveryBusy = 139, - + VRInitError_Init_USBServiceBusy = 140, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1102,6 +1152,7 @@ enum EVRInitError VRInitError_Compositor_UnableToCreateDevice = 405, VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, @@ -1186,6 +1237,16 @@ typedef uint32_t ScreenshotHandle_t; static const uint32_t k_unScreenshotHandleInvalid = 0; +/** Frame timing data provided by direct mode drivers. */ +struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( DriverDirectMode_FrameTiming ) + uint32_t m_nNumFramePresents; // number of times frame was presented + uint32_t m_nNumMisPresented; // number of times frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out (i.e. compositor missed vsync) + uint32_t m_nReprojectionFlags; +}; + #pragma pack( pop ) // figure out how to import from the VR API dll @@ -1255,6 +1316,7 @@ enum ECameraVideoStreamFormat CVS_FORMAT_RAW10 = 1, // 10 bits per pixel CVS_FORMAT_NV12 = 2, // 12 bits per pixel CVS_FORMAT_RGB24 = 3, // 24 bits per pixel + CVS_FORMAT_NV12_2 = 4, // 12 bits per pixel, 2x height CVS_MAX_FORMATS }; @@ -1418,6 +1480,7 @@ namespace vr static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; //----------------------------------------------------------------------------- // lighthouse keys @@ -1427,6 +1490,7 @@ namespace vr static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; //----------------------------------------------------------------------------- // null keys @@ -1743,9 +1807,14 @@ namespace vr /** Submits queued layers for display. */ virtual void Present( vr::SharedTextureHandle_t syncTexture ) {} + /** Called after Present to allow driver to take more time until vsync after they've successfully acquired the sync texture in Present.*/ + virtual void PostPresent() {} + + /** Called to get additional frame timing stats from driver. Check m_nSize for versioning (new members will be added to end only). */ + virtual void GetFrameTiming( DriverDirectMode_FrameTiming *pFrameTiming ) {} }; - static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_002"; + static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_004"; } diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so index eb2a5eaf..cd355b1a 100755 Binary files a/lib/linux32/libopenvr_api.so and b/lib/linux32/libopenvr_api.so differ diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so index fc1778f2..cdd35590 100755 Binary files a/lib/linux64/libopenvr_api.so and b/lib/linux64/libopenvr_api.so differ diff --git a/lib/win32/openvr_api.lib b/lib/win32/openvr_api.lib index 35179360..2ae7254d 100644 Binary files a/lib/win32/openvr_api.lib and b/lib/win32/openvr_api.lib differ diff --git a/lib/win64/openvr_api.lib b/lib/win64/openvr_api.lib index 18d84adc..62de19d3 100644 Binary files a/lib/win64/openvr_api.lib and b/lib/win64/openvr_api.lib differ diff --git a/samples/bin/linux64/libopenvr_api.so b/samples/bin/linux64/libopenvr_api.so index 71306640..d4d628a8 100644 Binary files a/samples/bin/linux64/libopenvr_api.so and b/samples/bin/linux64/libopenvr_api.so differ diff --git a/samples/bin/osx32/libopenvr_api.dylib b/samples/bin/osx32/libopenvr_api.dylib index b3534221..a62096ff 100644 Binary files a/samples/bin/osx32/libopenvr_api.dylib and b/samples/bin/osx32/libopenvr_api.dylib differ diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll index 94a51bff..05cb0974 100644 Binary files a/samples/bin/win32/openvr_api.dll and b/samples/bin/win32/openvr_api.dll differ diff --git a/samples/bin/win64/openvr_api.dll b/samples/bin/win64/openvr_api.dll index d20a79e4..736677d3 100644 Binary files a/samples/bin/win64/openvr_api.dll and b/samples/bin/win64/openvr_api.dll differ diff --git a/src/vrcommon/hmderrors_public.cpp b/src/vrcommon/hmderrors_public.cpp index c85a548f..c7356f92 100644 --- a/src/vrcommon/hmderrors_public.cpp +++ b/src/vrcommon/hmderrors_public.cpp @@ -55,6 +55,7 @@ const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) case VRInitError_Init_RebootingBusy: return "Rebooting In Progress (137)"; case VRInitError_Init_FirmwareUpdateBusy: return "Firmware Update In Progress (138)"; case VRInitError_Init_FirmwareRecoveryBusy: return "Firmware Recovery In Progress (139)"; + case VRInitError_Init_USBServiceBusy: return "USB Service Busy (140)"; case VRInitError_Driver_Failed: return "Driver Failed (200)"; case VRInitError_Driver_Unknown: return "Driver Not Known (201)"; @@ -108,11 +109,7 @@ const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) case VRInitError_Steam_SteamInstallationNotFound: return "Unable to find Steam installation (2000)"; default: - { - static char buf[128]; - sprintf( buf, "Unknown error (%d)", eError ); - return buf; - } + return GetIDForVRInitError( eError ); } } @@ -198,8 +195,9 @@ const char *GetIDForVRInitError( vr::EVRInitError eError ) RETURN_ENUM_AS_STRING( VRInitError_Compositor_ScreenshotsInitFailed ); RETURN_ENUM_AS_STRING( VRInitError_Compositor_UnableToCreateDevice ); - // Oculus + // Vendor-specific errors RETURN_ENUM_AS_STRING( VRInitError_VendorSpecific_UnableToConnectToOculusRuntime); + RETURN_ENUM_AS_STRING( VRInitError_VendorSpecific_WindowsNotInDevMode ); // Lighthouse RETURN_ENUM_AS_STRING( VRInitError_VendorSpecific_HmdFound_CantOpenDevice); diff --git a/src/vrcommon/pathtools_public.cpp b/src/vrcommon/pathtools_public.cpp index 7f7c7e8f..843caa35 100644 --- a/src/vrcommon/pathtools_public.cpp +++ b/src/vrcommon/pathtools_public.cpp @@ -464,10 +464,11 @@ bool Path_IsDirectory( const std::string & sPath ) bool Path_IsAppBundle( const std::string & sPath ) { #if defined(OSX) - NSBundle *bundle = [ NSBundle bundleWithPath: [ NSString stringWithUTF8String:sPath.c_str() ] ]; - bool bisAppBundle = ( nullptr != bundle ); - [ bundle release ]; - return bisAppBundle; + @autoreleasepool { + NSBundle *bundle = [ NSBundle bundleWithPath: [ NSString stringWithUTF8String:sPath.c_str() ] ]; + bool bisAppBundle = ( nullptr != bundle ); + return bisAppBundle; + } #else return false; #endif diff --git a/src/vrcommon/strtools_public.cpp b/src/vrcommon/strtools_public.cpp index 9ab60d90..9c4c99f7 100644 --- a/src/vrcommon/strtools_public.cpp +++ b/src/vrcommon/strtools_public.cpp @@ -3,6 +3,8 @@ #include #include #include +#include +#include //----------------------------------------------------------------------------- // Purpose: @@ -435,3 +437,19 @@ void V_StripExtension( std::string &in ) } } + +//----------------------------------------------------------------------------- +// Purpose: Tokenizes a string into a vector of strings +//----------------------------------------------------------------------------- +std::vector TokenizeString( const std::string & sString, char cToken ) +{ + std::vector vecStrings; + std::istringstream stream( sString ); + std::string s; + while ( std::getline( stream, s, cToken ) ) + { + vecStrings.push_back( s ); + } + return vecStrings; +} + diff --git a/src/vrcommon/strtools_public.h b/src/vrcommon/strtools_public.h index 4bab9b74..0d6db35f 100644 --- a/src/vrcommon/strtools_public.h +++ b/src/vrcommon/strtools_public.h @@ -4,6 +4,7 @@ #include #include #include +#include /** returns true if the string has the prefix */ bool StringHasPrefix( const std::string & sString, const std::string & sPrefix ); @@ -124,3 +125,5 @@ size_t V_URLDecode( char *pchDecodeDest, int nDecodeDestLen, const char *pchEnco void V_StripExtension( std::string &in ); +/** Tokenizes a string into a vector of strings */ +std::vector TokenizeString( const std::string & sString, char cToken ); diff --git a/src/vrcommon/vrpathregistry_public.cpp b/src/vrcommon/vrpathregistry_public.cpp index 061f5fbc..79c73518 100644 --- a/src/vrcommon/vrpathregistry_public.cpp +++ b/src/vrcommon/vrpathregistry_public.cpp @@ -60,7 +60,7 @@ static std::string GetAppSettingsPath() NSString *resolvedPath = [paths objectAtIndex:0]; resolvedPath = [resolvedPath stringByAppendingPathComponent: @"OpenVR"]; - if ( ![[NSFileManager new] createDirectoryAtPath: resolvedPath withIntermediateDirectories:YES attributes:nil error:nil] ) + if ( ![[NSFileManager defaultManager] createDirectoryAtPath: resolvedPath withIntermediateDirectories:YES attributes:nil error:nil] ) { return ""; }