diff --git a/CMakeLists.txt b/CMakeLists.txt index d372198f..8956cdad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,10 @@ endif() # Get platform. if(WIN32) - set(PLATFORM_NAME "win") + set(PLATFORM_NAME "win") + if(NOT BUILD_SHARED) + add_definitions(-DOPENVR_BUILD_STATIC) + endif() elseif(UNIX AND NOT APPLE) if(CMAKE_SYSTEM_NAME MATCHES ".*Linux") set(PLATFORM_NAME "linux") diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so index 6206801e..7c3940bc 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 9d72aec0..9520d4cf 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 19001b38..7ee96ea1 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 ee2fa4df..240ea671 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 0c651536..b3c2569b 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 a27e410e..095ca482 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 39cbaf34..66d492bb 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 f1f486dd..0614e8f3 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 ca357662..7c9a0b17 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 3c67e202..6b11a0ab 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 8d405aa3..59d97a15 100644 --- a/headers/openvr.h +++ b/headers/openvr.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 2; - static const uint32_t k_nSteamVRVersionBuild = 10; + static const uint32_t k_nSteamVRVersionMinor = 3; + static const uint32_t k_nSteamVRVersionBuild = 20; } // namespace vr // vrtypes.h @@ -352,6 +352,8 @@ enum ETrackedDeviceProperty Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) Prop_BootloaderVersion_Uint64 = 1044, + Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device + Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -457,6 +459,8 @@ enum ETrackedDeviceProperty Prop_TrackingRangeMinimumMeters_Float = 4004, Prop_TrackingRangeMaximumMeters_Float = 4005, Prop_ModeLabel_String = 4006, + Prop_CanWirelessIdentify_Bool = 4007, // volatile, based on radio presence and fw discovery + Prop_Nonce_Int32 = 4008, // Properties that are used for user interface like icons names Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties. @@ -688,7 +692,7 @@ enum EVREventType VREvent_OverlayHidden = 501, VREvent_DashboardActivated = 502, VREvent_DashboardDeactivated = 503, - VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + //VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay VREvent_ResetDashboard = 506, // Send to the overlay manager VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID @@ -716,6 +720,7 @@ enum EVREventType VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled VREvent_ShowUI = 528, // data is showUi + VREvent_ShowDevTools = 529, // data is showDevTools VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -727,6 +732,7 @@ enum EVREventType VREvent_QuitAborted_UserPrompt = 702, // data is process VREvent_QuitAcknowledged = 703, // data is process VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo() VREvent_ChaperoneUniverseHasChanged = 801, @@ -783,6 +789,11 @@ enum EVREventType VREvent_Compositor_MirrorWindowHidden = 1401, VREvent_Compositor_ChaperoneBoundsShown = 1410, VREvent_Compositor_ChaperoneBoundsHidden = 1411, + VREvent_Compositor_DisplayDisconnected = 1412, + VREvent_Compositor_DisplayReconnected = 1413, + VREvent_Compositor_HDCPError = 1414, // data is hdcpError + VREvent_Compositor_ApplicationNotResponding = 1415, + VREvent_Compositor_ApplicationResumed = 1416, VREvent_TrackedCamera_StartVideoStream = 1500, VREvent_TrackedCamera_StopVideoStream = 1501, @@ -811,6 +822,8 @@ enum EVREventType VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver + VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast + // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, @@ -890,11 +903,12 @@ struct VREvent_Mouse_t uint32_t button; // EVRMouseButton enum }; -/** used for simulated mouse wheel scroll in overlay space */ +/** used for simulated mouse wheel scroll */ struct VREvent_Scroll_t { - float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe - uint32_t repeatCount; + float xdelta, ydelta; + uint32_t unused; + float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1] }; /** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger @@ -1087,6 +1101,7 @@ enum EShowUIType ShowUI_ManageTrackers = 1, ShowUI_QuickStart = 2, ShowUI_Pairing = 3, + ShowUI_Settings = 4, }; struct VREvent_ShowUI_t @@ -1094,6 +1109,25 @@ struct VREvent_ShowUI_t EShowUIType eType; }; +struct VREvent_ShowDevTools_t +{ + int32_t nBrowserIdentifier; +}; + +enum EHDCPError +{ + HDCPError_None = 0, + HDCPError_LinkLost = 1, + HDCPError_Tampered = 2, + HDCPError_DeviceRevoked = 3, + HDCPError_Unknown = 4 +}; + +struct VREvent_HDCPError_t +{ + EHDCPError eCode; +}; + typedef union { VREvent_Reserved_t reserved; @@ -1124,6 +1158,8 @@ typedef union VREvent_SpatialAnchor_t spatialAnchor; VREvent_ProgressUpdate_t progressUpdate; VREvent_ShowUI_t showUi; + VREvent_ShowDevTools_t showDevTools; + VREvent_HDCPError_t hdcpError; /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ } VREvent_Data_t; @@ -1384,7 +1420,7 @@ enum EVRSkeletalMotionRange enum EVRSkeletalTrackingLevel { - // body part location can’t be directly determined by the device. Any skeletal pose provided by + // body part location can't be directly determined by the device. Any skeletal pose provided by // the device is estimated by assuming the position required to active buttons, triggers, joysticks, // or other input sensors. // E.g. Vive Controller, Gamepad @@ -1468,6 +1504,7 @@ enum EVRInitError VRInitError_Init_USBServiceBusy = 140, VRInitError_Init_VRWebHelperStartupFailed = 141, VRInitError_Init_TrackerManagerInitFailed = 142, + VRInitError_Init_AlreadyRunning = 143, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1597,6 +1634,9 @@ enum EVRInitError VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, VRInitError_Steam_SteamInstallationNotFound = 2000, + + // Strictly a placeholder + VRInitError_LastError }; enum EVRScreenshotType @@ -1732,29 +1772,33 @@ struct ImuSample_t // figure out how to import from the VR API dll #if defined(_WIN32) -#ifdef VR_API_EXPORT -#define VR_INTERFACE extern "C" __declspec( dllexport ) -#else -#define VR_INTERFACE extern "C" __declspec( dllimport ) -#endif + #if !defined(OPENVR_BUILD_STATIC) + #ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __declspec( dllexport ) + #else + #define VR_INTERFACE extern "C" __declspec( dllimport ) + #endif + #else + #define VR_INTERFACE extern "C" + #endif #elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) #ifdef VR_API_EXPORT -#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) + #define VR_INTERFACE extern "C" __attribute__((visibility("default"))) #else -#define VR_INTERFACE extern "C" + #define VR_INTERFACE extern "C" #endif #else -#error "Unsupported Platform." + #error "Unsupported Platform." #endif #if defined( _WIN32 ) -#define VR_CALLTYPE __cdecl + #define VR_CALLTYPE __cdecl #else -#define VR_CALLTYPE + #define VR_CALLTYPE #endif } // namespace vr @@ -2508,6 +2552,7 @@ namespace vr static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; + static const char * const k_pch_Lighthouse_NewPairing_Bool = "newPairing"; //----------------------------------------------------------------------------- // null keys @@ -2609,9 +2654,10 @@ namespace vr static const char * const k_pch_Dashboard_Section = "dashboard"; static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - static const char * const k_pch_Dashboard_EnableWebUI = "webUI"; - static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools"; - static const char * const k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; + static const char * const k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; + static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings"; + static const char * const k_pch_Dashboard_UseWebIPD = "useWebIPD"; + static const char * const k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; //----------------------------------------------------------------------------- // model skin keys @@ -3178,7 +3224,7 @@ struct NotificationBitmap_t , m_nHeight( 0 ) , m_nBytesPerPixel( 0 ) { - }; + } void *m_pImageData; int32_t m_nWidth; @@ -4463,6 +4509,9 @@ namespace vr /** Shows the current binding all the actions in the specified action sets */ virtual EVRInputError ShowBindingsForActionSet( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight ) = 0; + + // --------------- Legacy Input ------------------- // + virtual bool IsUsingLegacyInput() = 0; }; static const char * const IVRInput_Version = "IVRInput_005"; diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs index a3986f19..3f8267b3 100644 --- a/headers/openvr_api.cs +++ b/headers/openvr_api.cs @@ -1660,6 +1660,11 @@ public struct IVRInput [MarshalAs(UnmanagedType.FunctionPtr)] internal _ShowBindingsForActionSet ShowBindingsForActionSet; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + internal delegate bool _IsUsingLegacyInput(); + [MarshalAs(UnmanagedType.FunctionPtr)] + internal _IsUsingLegacyInput IsUsingLegacyInput; + } [StructLayout(LayoutKind.Sequential)] @@ -3589,6 +3594,11 @@ public EVRInputError ShowBindingsForActionSet(VRActiveActionSet_t [] pSets,uint EVRInputError result = FnTable.ShowBindingsForActionSet(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length,originToHighlight); return result; } + public bool IsUsingLegacyInput() + { + bool result = FnTable.IsUsingLegacyInput(); + return result; + } } @@ -3803,6 +3813,8 @@ public enum ETrackedDeviceProperty Prop_AdditionalDeviceSettingsPath_String = 1042, Prop_Identifiable_Bool = 1043, Prop_BootloaderVersion_Uint64 = 1044, + Prop_AdditionalSystemReportData_String = 1045, + Prop_CompositeFirmwareVersion_String = 1046, Prop_ReportsTimeSinceVSync_Bool = 2000, Prop_SecondsFromVsyncToPhotons_Float = 2001, Prop_DisplayFrequency_Float = 2002, @@ -3899,6 +3911,8 @@ public enum ETrackedDeviceProperty Prop_TrackingRangeMinimumMeters_Float = 4004, Prop_TrackingRangeMaximumMeters_Float = 4005, Prop_ModeLabel_String = 4006, + Prop_CanWirelessIdentify_Bool = 4007, + Prop_Nonce_Int32 = 4008, Prop_IconPathName_String = 5000, Prop_NamedIconPathDeviceOff_String = 5001, Prop_NamedIconPathDeviceSearching_String = 5002, @@ -4021,7 +4035,6 @@ public enum EVREventType VREvent_OverlayHidden = 501, VREvent_DashboardActivated = 502, VREvent_DashboardDeactivated = 503, - VREvent_DashboardThumbSelected = 504, VREvent_DashboardRequested = 505, VREvent_ResetDashboard = 506, VREvent_RenderToast = 507, @@ -4044,6 +4057,7 @@ public enum EVREventType VREvent_RoomViewShown = 526, VREvent_RoomViewHidden = 527, VREvent_ShowUI = 528, + VREvent_ShowDevTools = 529, VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, VREvent_Notification_BeginInteraction = 602, @@ -4053,6 +4067,7 @@ public enum EVREventType VREvent_QuitAborted_UserPrompt = 702, VREvent_QuitAcknowledged = 703, VREvent_DriverRequestedQuit = 704, + VREvent_RestartRequested = 705, VREvent_ChaperoneDataHasChanged = 800, VREvent_ChaperoneUniverseHasChanged = 801, VREvent_ChaperoneTempDataHasChanged = 802, @@ -4099,6 +4114,11 @@ public enum EVREventType VREvent_Compositor_MirrorWindowHidden = 1401, VREvent_Compositor_ChaperoneBoundsShown = 1410, VREvent_Compositor_ChaperoneBoundsHidden = 1411, + VREvent_Compositor_DisplayDisconnected = 1412, + VREvent_Compositor_DisplayReconnected = 1413, + VREvent_Compositor_HDCPError = 1414, + VREvent_Compositor_ApplicationNotResponding = 1415, + VREvent_Compositor_ApplicationResumed = 1416, VREvent_TrackedCamera_StartVideoStream = 1500, VREvent_TrackedCamera_StopVideoStream = 1501, VREvent_TrackedCamera_PauseVideoStream = 1502, @@ -4121,6 +4141,7 @@ public enum EVREventType VREvent_SpatialAnchors_DescriptorUpdated = 1801, VREvent_SpatialAnchors_RequestPoseUpdate = 1802, VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, + VREvent_SystemReport_Started = 1900, VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, } @@ -4173,6 +4194,15 @@ public enum EShowUIType ShowUI_ManageTrackers = 1, ShowUI_QuickStart = 2, ShowUI_Pairing = 3, + ShowUI_Settings = 4, +} +public enum EHDCPError +{ + None = 0, + LinkLost = 1, + Tampered = 2, + DeviceRevoked = 3, + Unknown = 4, } public enum EVRInputError { @@ -4354,6 +4384,7 @@ public enum EVRInitError Init_USBServiceBusy = 140, Init_VRWebHelperStartupFailed = 141, Init_TrackerManagerInitFailed = 142, + Init_AlreadyRunning = 143, Driver_Failed = 200, Driver_Unknown = 201, Driver_HmdUnknown = 202, @@ -4476,6 +4507,7 @@ public enum EVRInitError VendorSpecific_HmdFound_UserDataError = 1112, VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, Steam_SteamInstallationNotFound = 2000, + LastError = 2001, } public enum EVRScreenshotType { @@ -4857,6 +4889,8 @@ public enum EIOBufferMode [FieldOffset(0)] public VREvent_InputActionManifestLoad_t actionManifest; [FieldOffset(0)] public VREvent_ProgressUpdate_t progressUpdate; [FieldOffset(0)] public VREvent_ShowUI_t showUi; + [FieldOffset(0)] public VREvent_ShowDevTools_t showDevTools; + [FieldOffset(0)] public VREvent_HDCPError_t hdcpError; [FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug } @@ -5054,7 +5088,8 @@ public enum EIOBufferMode { public float xdelta; public float ydelta; - public uint repeatCount; + public uint unused; + public float viewportscale; } [StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t { @@ -5216,6 +5251,14 @@ public string cNewInput { public EShowUIType eType; } +[StructLayout(LayoutKind.Sequential)] public struct VREvent_ShowDevTools_t +{ + public int nBrowserIdentifier; +} +[StructLayout(LayoutKind.Sequential)] public struct VREvent_HDCPError_t +{ + public EHDCPError eCode; +} [StructLayout(LayoutKind.Sequential)] public struct VREvent_t { public uint eventType; @@ -5932,6 +5975,7 @@ public static uint GetInitToken() public const string k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; public const string k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; 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"; public const string k_pch_Null_SerialNumber_String = "serialNumber"; public const string k_pch_Null_ModelNumber_String = "modelNumber"; @@ -6003,9 +6047,10 @@ public static uint GetInitToken() public const string k_pch_Dashboard_Section = "dashboard"; public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - public const string k_pch_Dashboard_EnableWebUI = "webUI"; - public const string k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools"; - public const string k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; + public const string k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; + public const string k_pch_Dashboard_UseWebSettings = "useWebSettings"; + public const string k_pch_Dashboard_UseWebIPD = "useWebIPD"; + public const string k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; public const string k_pch_modelskin_Section = "modelskins"; public const string k_pch_Driver_Enable_Bool = "enable"; public const string k_pch_WebInterface_Section = "WebInterface"; @@ -6059,7 +6104,7 @@ public void Clear() m_pVRScreenshots = null; m_pVRTrackedCamera = null; m_pVRInput = null; - m_pIOBuffer = null; + m_pVRIOBuffer = null; m_pVRSpatialAnchors = null; m_pVRNotifications = null; } diff --git a/headers/openvr_api.json b/headers/openvr_api.json index 6eddbd4e..508e434d 100644 --- a/headers/openvr_api.json +++ b/headers/openvr_api.json @@ -142,6 +142,8 @@ ,{"name": "Prop_AdditionalDeviceSettingsPath_String","value": "1042"} ,{"name": "Prop_Identifiable_Bool","value": "1043"} ,{"name": "Prop_BootloaderVersion_Uint64","value": "1044"} + ,{"name": "Prop_AdditionalSystemReportData_String","value": "1045"} + ,{"name": "Prop_CompositeFirmwareVersion_String","value": "1046"} ,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"} ,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"} ,{"name": "Prop_DisplayFrequency_Float","value": "2002"} @@ -238,6 +240,8 @@ ,{"name": "Prop_TrackingRangeMinimumMeters_Float","value": "4004"} ,{"name": "Prop_TrackingRangeMaximumMeters_Float","value": "4005"} ,{"name": "Prop_ModeLabel_String","value": "4006"} + ,{"name": "Prop_CanWirelessIdentify_Bool","value": "4007"} + ,{"name": "Prop_Nonce_Int32","value": "4008"} ,{"name": "Prop_IconPathName_String","value": "5000"} ,{"name": "Prop_NamedIconPathDeviceOff_String","value": "5001"} ,{"name": "Prop_NamedIconPathDeviceSearching_String","value": "5002"} @@ -356,7 +360,6 @@ ,{"name": "VREvent_OverlayHidden","value": "501"} ,{"name": "VREvent_DashboardActivated","value": "502"} ,{"name": "VREvent_DashboardDeactivated","value": "503"} - ,{"name": "VREvent_DashboardThumbSelected","value": "504"} ,{"name": "VREvent_DashboardRequested","value": "505"} ,{"name": "VREvent_ResetDashboard","value": "506"} ,{"name": "VREvent_RenderToast","value": "507"} @@ -379,6 +382,7 @@ ,{"name": "VREvent_RoomViewShown","value": "526"} ,{"name": "VREvent_RoomViewHidden","value": "527"} ,{"name": "VREvent_ShowUI","value": "528"} + ,{"name": "VREvent_ShowDevTools","value": "529"} ,{"name": "VREvent_Notification_Shown","value": "600"} ,{"name": "VREvent_Notification_Hidden","value": "601"} ,{"name": "VREvent_Notification_BeginInteraction","value": "602"} @@ -388,6 +392,7 @@ ,{"name": "VREvent_QuitAborted_UserPrompt","value": "702"} ,{"name": "VREvent_QuitAcknowledged","value": "703"} ,{"name": "VREvent_DriverRequestedQuit","value": "704"} + ,{"name": "VREvent_RestartRequested","value": "705"} ,{"name": "VREvent_ChaperoneDataHasChanged","value": "800"} ,{"name": "VREvent_ChaperoneUniverseHasChanged","value": "801"} ,{"name": "VREvent_ChaperoneTempDataHasChanged","value": "802"} @@ -434,6 +439,11 @@ ,{"name": "VREvent_Compositor_MirrorWindowHidden","value": "1401"} ,{"name": "VREvent_Compositor_ChaperoneBoundsShown","value": "1410"} ,{"name": "VREvent_Compositor_ChaperoneBoundsHidden","value": "1411"} + ,{"name": "VREvent_Compositor_DisplayDisconnected","value": "1412"} + ,{"name": "VREvent_Compositor_DisplayReconnected","value": "1413"} + ,{"name": "VREvent_Compositor_HDCPError","value": "1414"} + ,{"name": "VREvent_Compositor_ApplicationNotResponding","value": "1415"} + ,{"name": "VREvent_Compositor_ApplicationResumed","value": "1416"} ,{"name": "VREvent_TrackedCamera_StartVideoStream","value": "1500"} ,{"name": "VREvent_TrackedCamera_StopVideoStream","value": "1501"} ,{"name": "VREvent_TrackedCamera_PauseVideoStream","value": "1502"} @@ -456,6 +466,7 @@ ,{"name": "VREvent_SpatialAnchors_DescriptorUpdated","value": "1801"} ,{"name": "VREvent_SpatialAnchors_RequestPoseUpdate","value": "1802"} ,{"name": "VREvent_SpatialAnchors_RequestDescriptorUpdate","value": "1803"} + ,{"name": "VREvent_SystemReport_Started","value": "1900"} ,{"name": "VREvent_VendorSpecific_Reserved_Start","value": "10000"} ,{"name": "VREvent_VendorSpecific_Reserved_End","value": "19999"} ]} @@ -503,6 +514,14 @@ ,{"name": "ShowUI_ManageTrackers","value": "1"} ,{"name": "ShowUI_QuickStart","value": "2"} ,{"name": "ShowUI_Pairing","value": "3"} + ,{"name": "ShowUI_Settings","value": "4"} +]} +, {"enumname": "vr::EHDCPError","values": [ + {"name": "HDCPError_None","value": "0"} + ,{"name": "HDCPError_LinkLost","value": "1"} + ,{"name": "HDCPError_Tampered","value": "2"} + ,{"name": "HDCPError_DeviceRevoked","value": "3"} + ,{"name": "HDCPError_Unknown","value": "4"} ]} , {"enumname": "vr::EVRInputError","values": [ {"name": "VRInputError_None","value": "0"} @@ -671,6 +690,7 @@ ,{"name": "VRInitError_Init_USBServiceBusy","value": "140"} ,{"name": "VRInitError_Init_VRWebHelperStartupFailed","value": "141"} ,{"name": "VRInitError_Init_TrackerManagerInitFailed","value": "142"} + ,{"name": "VRInitError_Init_AlreadyRunning","value": "143"} ,{"name": "VRInitError_Driver_Failed","value": "200"} ,{"name": "VRInitError_Driver_Unknown","value": "201"} ,{"name": "VRInitError_Driver_HmdUnknown","value": "202"} @@ -793,6 +813,7 @@ ,{"name": "VRInitError_VendorSpecific_HmdFound_UserDataError","value": "1112"} ,{"name": "VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck","value": "1113"} ,{"name": "VRInitError_Steam_SteamInstallationNotFound","value": "2000"} + ,{"name": "VRInitError_LastError","value": "2001"} ]} , {"enumname": "vr::EVRScreenshotType","values": [ {"name": "VRScreenshotType_None","value": "0"} @@ -1378,6 +1399,8 @@ "constname": "k_pch_Lighthouse_PowerManagedBaseStations2_String","consttype": "const char *const", "constval": "PowerManagedBaseStations2"} ,{ "constname": "k_pch_Lighthouse_EnableImuFallback_Bool","consttype": "const char *const", "constval": "enableImuFallback"} +,{ + "constname": "k_pch_Lighthouse_NewPairing_Bool","consttype": "const char *const", "constval": "newPairing"} ,{ "constname": "k_pch_Null_Section","consttype": "const char *const", "constval": "driver_null"} ,{ @@ -1521,11 +1544,13 @@ ,{ "constname": "k_pch_Dashboard_ArcadeMode_Bool","consttype": "const char *const", "constval": "arcadeMode"} ,{ - "constname": "k_pch_Dashboard_EnableWebUI","consttype": "const char *const", "constval": "webUI"} + "constname": "k_pch_Dashboard_UseWebDashboard","consttype": "const char *const", "constval": "useWebDashboard"} ,{ - "constname": "k_pch_Dashboard_EnableWebUIDevTools","consttype": "const char *const", "constval": "webUIDevTools"} + "constname": "k_pch_Dashboard_UseWebSettings","consttype": "const char *const", "constval": "useWebSettings"} ,{ - "constname": "k_pch_Dashboard_EnableWebUIDashboardReplacement","consttype": "const char *const", "constval": "webUIDashboard"} + "constname": "k_pch_Dashboard_UseWebIPD","consttype": "const char *const", "constval": "useWebIPD"} +,{ + "constname": "k_pch_Dashboard_UseWebPowerMenu","consttype": "const char *const", "constval": "useWebPowerMenu"} ,{ "constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"} ,{ @@ -1675,7 +1700,8 @@ ,{"struct": "vr::VREvent_Scroll_t","fields": [ { "fieldname": "xdelta", "fieldtype": "float"}, { "fieldname": "ydelta", "fieldtype": "float"}, -{ "fieldname": "repeatCount", "fieldtype": "uint32_t"}]} +{ "fieldname": "unused", "fieldtype": "uint32_t"}, +{ "fieldname": "viewportscale", "fieldtype": "float"}]} ,{"struct": "vr::VREvent_TouchPadMove_t","fields": [ { "fieldname": "bFingerDown", "fieldtype": "_Bool"}, { "fieldname": "flSecondsFingerDown", "fieldtype": "float"}, @@ -1766,6 +1792,10 @@ { "fieldname": "fProgress", "fieldtype": "float"}]} ,{"struct": "vr::VREvent_ShowUI_t","fields": [ { "fieldname": "eType", "fieldtype": "enum vr::EShowUIType"}]} +,{"struct": "vr::VREvent_ShowDevTools_t","fields": [ +{ "fieldname": "nBrowserIdentifier", "fieldtype": "int32_t"}]} +,{"struct": "vr::VREvent_HDCPError_t","fields": [ +{ "fieldname": "eCode", "fieldtype": "enum vr::EHDCPError"}]} ,{"struct": "vr::(anonymous)","fields": [ { "fieldname": "reserved", "fieldtype": "struct vr::VREvent_Reserved_t"}, { "fieldname": "controller", "fieldtype": "struct vr::VREvent_Controller_t"}, @@ -1794,7 +1824,9 @@ { "fieldname": "actionManifest", "fieldtype": "struct vr::VREvent_InputActionManifestLoad_t"}, { "fieldname": "spatialAnchor", "fieldtype": "struct vr::VREvent_SpatialAnchor_t"}, { "fieldname": "progressUpdate", "fieldtype": "struct vr::VREvent_ProgressUpdate_t"}, -{ "fieldname": "showUi", "fieldtype": "struct vr::VREvent_ShowUI_t"}]} +{ "fieldname": "showUi", "fieldtype": "struct vr::VREvent_ShowUI_t"}, +{ "fieldname": "showDevTools", "fieldtype": "struct vr::VREvent_ShowDevTools_t"}, +{ "fieldname": "hdcpError", "fieldtype": "struct vr::VREvent_HDCPError_t"}]} ,{"struct": "vr::VREvent_t","fields": [ { "fieldname": "eventType", "fieldtype": "uint32_t"}, { "fieldname": "trackedDeviceIndex", "fieldtype": "TrackedDeviceIndex_t"}, @@ -4816,6 +4848,11 @@ { "paramname": "originToHighlight" ,"paramtype": "vr::VRInputValueHandle_t"} ] } +,{ + "classname": "vr::IVRInput", + "methodname": "IsUsingLegacyInput", + "returntype": "bool" +} ,{ "classname": "vr::IVRIOBuffer", "methodname": "Open", diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h index 8cf0cbff..03724dd7 100644 --- a/headers/openvr_capi.h +++ b/headers/openvr_capi.h @@ -199,6 +199,7 @@ static const char * k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; static const char * k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; static const char * k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; static const char * k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; +static const char * k_pch_Lighthouse_NewPairing_Bool = "newPairing"; 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"; @@ -270,9 +271,10 @@ static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositor static const char * k_pch_Dashboard_Section = "dashboard"; static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; -static const char * k_pch_Dashboard_EnableWebUI = "webUI"; -static const char * k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools"; -static const char * k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; +static const char * k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; +static const char * k_pch_Dashboard_UseWebSettings = "useWebSettings"; +static const char * k_pch_Dashboard_UseWebIPD = "useWebIPD"; +static const char * k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; static const char * k_pch_modelskin_Section = "modelskins"; static const char * k_pch_Driver_Enable_Bool = "enable"; static const char * k_pch_WebInterface_Section = "WebInterface"; @@ -425,6 +427,8 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_AdditionalDeviceSettingsPath_String = 1042, ETrackedDeviceProperty_Prop_Identifiable_Bool = 1043, ETrackedDeviceProperty_Prop_BootloaderVersion_Uint64 = 1044, + ETrackedDeviceProperty_Prop_AdditionalSystemReportData_String = 1045, + ETrackedDeviceProperty_Prop_CompositeFirmwareVersion_String = 1046, ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, @@ -521,6 +525,8 @@ typedef enum ETrackedDeviceProperty ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004, ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005, ETrackedDeviceProperty_Prop_ModeLabel_String = 4006, + ETrackedDeviceProperty_Prop_CanWirelessIdentify_Bool = 4007, + ETrackedDeviceProperty_Prop_Nonce_Int32 = 4008, ETrackedDeviceProperty_Prop_IconPathName_String = 5000, ETrackedDeviceProperty_Prop_NamedIconPathDeviceOff_String = 5001, ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearching_String = 5002, @@ -647,7 +653,6 @@ typedef enum EVREventType EVREventType_VREvent_OverlayHidden = 501, EVREventType_VREvent_DashboardActivated = 502, EVREventType_VREvent_DashboardDeactivated = 503, - EVREventType_VREvent_DashboardThumbSelected = 504, EVREventType_VREvent_DashboardRequested = 505, EVREventType_VREvent_ResetDashboard = 506, EVREventType_VREvent_RenderToast = 507, @@ -670,6 +675,7 @@ typedef enum EVREventType EVREventType_VREvent_RoomViewShown = 526, EVREventType_VREvent_RoomViewHidden = 527, EVREventType_VREvent_ShowUI = 528, + EVREventType_VREvent_ShowDevTools = 529, EVREventType_VREvent_Notification_Shown = 600, EVREventType_VREvent_Notification_Hidden = 601, EVREventType_VREvent_Notification_BeginInteraction = 602, @@ -679,6 +685,7 @@ typedef enum EVREventType EVREventType_VREvent_QuitAborted_UserPrompt = 702, EVREventType_VREvent_QuitAcknowledged = 703, EVREventType_VREvent_DriverRequestedQuit = 704, + EVREventType_VREvent_RestartRequested = 705, EVREventType_VREvent_ChaperoneDataHasChanged = 800, EVREventType_VREvent_ChaperoneUniverseHasChanged = 801, EVREventType_VREvent_ChaperoneTempDataHasChanged = 802, @@ -725,6 +732,11 @@ typedef enum EVREventType EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401, EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410, EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411, + EVREventType_VREvent_Compositor_DisplayDisconnected = 1412, + EVREventType_VREvent_Compositor_DisplayReconnected = 1413, + EVREventType_VREvent_Compositor_HDCPError = 1414, + EVREventType_VREvent_Compositor_ApplicationNotResponding = 1415, + EVREventType_VREvent_Compositor_ApplicationResumed = 1416, EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500, EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501, EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502, @@ -747,6 +759,7 @@ typedef enum EVREventType EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801, EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802, EVREventType_VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, + EVREventType_VREvent_SystemReport_Started = 1900, EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000, EVREventType_VREvent_VendorSpecific_Reserved_End = 19999, } EVREventType; @@ -804,8 +817,18 @@ typedef enum EShowUIType EShowUIType_ShowUI_ManageTrackers = 1, EShowUIType_ShowUI_QuickStart = 2, EShowUIType_ShowUI_Pairing = 3, + EShowUIType_ShowUI_Settings = 4, } EShowUIType; +typedef enum EHDCPError +{ + EHDCPError_HDCPError_None = 0, + EHDCPError_HDCPError_LinkLost = 1, + EHDCPError_HDCPError_Tampered = 2, + EHDCPError_HDCPError_DeviceRevoked = 3, + EHDCPError_HDCPError_Unknown = 4, +} EHDCPError; + typedef enum EVRInputError { EVRInputError_VRInputError_None = 0, @@ -998,6 +1021,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_Init_USBServiceBusy = 140, EVRInitError_VRInitError_Init_VRWebHelperStartupFailed = 141, EVRInitError_VRInitError_Init_TrackerManagerInitFailed = 142, + EVRInitError_VRInitError_Init_AlreadyRunning = 143, EVRInitError_VRInitError_Driver_Failed = 200, EVRInitError_VRInitError_Driver_Unknown = 201, EVRInitError_VRInitError_Driver_HmdUnknown = 202, @@ -1120,6 +1144,7 @@ typedef enum EVRInitError EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000, + EVRInitError_VRInitError_LastError = 2001, } EVRInitError; typedef enum EVRScreenshotType @@ -1719,7 +1744,8 @@ typedef struct VREvent_Scroll_t { float xdelta; float ydelta; - uint32_t repeatCount; + uint32_t unused; + float viewportscale; } VREvent_Scroll_t; typedef struct VREvent_TouchPadMove_t @@ -1887,6 +1913,16 @@ typedef struct VREvent_ShowUI_t enum EShowUIType eType; } VREvent_ShowUI_t; +typedef struct VREvent_ShowDevTools_t +{ + int32_t nBrowserIdentifier; +} VREvent_ShowDevTools_t; + +typedef struct VREvent_HDCPError_t +{ + enum EHDCPError eCode; +} VREvent_HDCPError_t; + typedef struct HiddenAreaMesh_t { struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t * @@ -2627,6 +2663,7 @@ struct VR_IVRInput_FnTable EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, struct InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowBindingsForActionSet)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); + bool (OPENVR_FNTABLE_CALLTYPE *IsUsingLegacyInput)(); }; struct VR_IVRIOBuffer_FnTable diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h index f46dc74d..8a48bc53 100644 --- a/headers/openvr_driver.h +++ b/headers/openvr_driver.h @@ -15,8 +15,8 @@ namespace vr { static const uint32_t k_nSteamVRVersionMajor = 1; - static const uint32_t k_nSteamVRVersionMinor = 2; - static const uint32_t k_nSteamVRVersionBuild = 10; + static const uint32_t k_nSteamVRVersionMinor = 3; + static const uint32_t k_nSteamVRVersionBuild = 20; } // namespace vr // vrtypes.h @@ -352,6 +352,8 @@ enum ETrackedDeviceProperty Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) Prop_BootloaderVersion_Uint64 = 1044, + Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device + Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports // Properties that are unique to TrackedDeviceClass_HMD Prop_ReportsTimeSinceVSync_Bool = 2000, @@ -457,6 +459,8 @@ enum ETrackedDeviceProperty Prop_TrackingRangeMinimumMeters_Float = 4004, Prop_TrackingRangeMaximumMeters_Float = 4005, Prop_ModeLabel_String = 4006, + Prop_CanWirelessIdentify_Bool = 4007, // volatile, based on radio presence and fw discovery + Prop_Nonce_Int32 = 4008, // Properties that are used for user interface like icons names Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties. @@ -688,7 +692,7 @@ enum EVREventType VREvent_OverlayHidden = 501, VREvent_DashboardActivated = 502, VREvent_DashboardDeactivated = 503, - VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + //VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay VREvent_ResetDashboard = 506, // Send to the overlay manager VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID @@ -716,6 +720,7 @@ enum EVREventType VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled VREvent_ShowUI = 528, // data is showUi + VREvent_ShowDevTools = 529, // data is showDevTools VREvent_Notification_Shown = 600, VREvent_Notification_Hidden = 601, @@ -727,6 +732,7 @@ enum EVREventType VREvent_QuitAborted_UserPrompt = 702, // data is process VREvent_QuitAcknowledged = 703, // data is process VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR VREvent_ChaperoneDataHasChanged = 800, // Sent when the process needs to call VRChaperone()->ReloadInfo() VREvent_ChaperoneUniverseHasChanged = 801, @@ -783,6 +789,11 @@ enum EVREventType VREvent_Compositor_MirrorWindowHidden = 1401, VREvent_Compositor_ChaperoneBoundsShown = 1410, VREvent_Compositor_ChaperoneBoundsHidden = 1411, + VREvent_Compositor_DisplayDisconnected = 1412, + VREvent_Compositor_DisplayReconnected = 1413, + VREvent_Compositor_HDCPError = 1414, // data is hdcpError + VREvent_Compositor_ApplicationNotResponding = 1415, + VREvent_Compositor_ApplicationResumed = 1416, VREvent_TrackedCamera_StartVideoStream = 1500, VREvent_TrackedCamera_StopVideoStream = 1501, @@ -811,6 +822,8 @@ enum EVREventType VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver + VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast + // Vendors are free to expose private events in this reserved region VREvent_VendorSpecific_Reserved_Start = 10000, VREvent_VendorSpecific_Reserved_End = 19999, @@ -890,11 +903,12 @@ struct VREvent_Mouse_t uint32_t button; // EVRMouseButton enum }; -/** used for simulated mouse wheel scroll in overlay space */ +/** used for simulated mouse wheel scroll */ struct VREvent_Scroll_t { - float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe - uint32_t repeatCount; + float xdelta, ydelta; + uint32_t unused; + float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1] }; /** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger @@ -1087,6 +1101,7 @@ enum EShowUIType ShowUI_ManageTrackers = 1, ShowUI_QuickStart = 2, ShowUI_Pairing = 3, + ShowUI_Settings = 4, }; struct VREvent_ShowUI_t @@ -1094,6 +1109,25 @@ struct VREvent_ShowUI_t EShowUIType eType; }; +struct VREvent_ShowDevTools_t +{ + int32_t nBrowserIdentifier; +}; + +enum EHDCPError +{ + HDCPError_None = 0, + HDCPError_LinkLost = 1, + HDCPError_Tampered = 2, + HDCPError_DeviceRevoked = 3, + HDCPError_Unknown = 4 +}; + +struct VREvent_HDCPError_t +{ + EHDCPError eCode; +}; + typedef union { VREvent_Reserved_t reserved; @@ -1124,6 +1158,8 @@ typedef union VREvent_SpatialAnchor_t spatialAnchor; VREvent_ProgressUpdate_t progressUpdate; VREvent_ShowUI_t showUi; + VREvent_ShowDevTools_t showDevTools; + VREvent_HDCPError_t hdcpError; /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ } VREvent_Data_t; @@ -1384,7 +1420,7 @@ enum EVRSkeletalMotionRange enum EVRSkeletalTrackingLevel { - // body part location can’t be directly determined by the device. Any skeletal pose provided by + // body part location can't be directly determined by the device. Any skeletal pose provided by // the device is estimated by assuming the position required to active buttons, triggers, joysticks, // or other input sensors. // E.g. Vive Controller, Gamepad @@ -1468,6 +1504,7 @@ enum EVRInitError VRInitError_Init_USBServiceBusy = 140, VRInitError_Init_VRWebHelperStartupFailed = 141, VRInitError_Init_TrackerManagerInitFailed = 142, + VRInitError_Init_AlreadyRunning = 143, VRInitError_Driver_Failed = 200, VRInitError_Driver_Unknown = 201, @@ -1597,6 +1634,9 @@ enum EVRInitError VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, VRInitError_Steam_SteamInstallationNotFound = 2000, + + // Strictly a placeholder + VRInitError_LastError }; enum EVRScreenshotType @@ -1732,29 +1772,33 @@ struct ImuSample_t // figure out how to import from the VR API dll #if defined(_WIN32) -#ifdef VR_API_EXPORT -#define VR_INTERFACE extern "C" __declspec( dllexport ) -#else -#define VR_INTERFACE extern "C" __declspec( dllimport ) -#endif + #if !defined(OPENVR_BUILD_STATIC) + #ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __declspec( dllexport ) + #else + #define VR_INTERFACE extern "C" __declspec( dllimport ) + #endif + #else + #define VR_INTERFACE extern "C" + #endif #elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) #ifdef VR_API_EXPORT -#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) + #define VR_INTERFACE extern "C" __attribute__((visibility("default"))) #else -#define VR_INTERFACE extern "C" + #define VR_INTERFACE extern "C" #endif #else -#error "Unsupported Platform." + #error "Unsupported Platform." #endif #if defined( _WIN32 ) -#define VR_CALLTYPE __cdecl + #define VR_CALLTYPE __cdecl #else -#define VR_CALLTYPE + #define VR_CALLTYPE #endif } // namespace vr @@ -2091,6 +2135,7 @@ namespace vr static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; + static const char * const k_pch_Lighthouse_NewPairing_Bool = "newPairing"; //----------------------------------------------------------------------------- // null keys @@ -2192,9 +2237,10 @@ namespace vr static const char * const k_pch_Dashboard_Section = "dashboard"; static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - static const char * const k_pch_Dashboard_EnableWebUI = "webUI"; - static const char * const k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools"; - static const char * const k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; + static const char * const k_pch_Dashboard_UseWebDashboard = "useWebDashboard"; + static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings"; + static const char * const k_pch_Dashboard_UseWebIPD = "useWebIPD"; + static const char * const k_pch_Dashboard_UseWebPowerMenu = "useWebPowerMenu"; //----------------------------------------------------------------------------- // model skin keys @@ -3134,6 +3180,9 @@ class IVRServerDriverHost /** Notifies the server that a tracked device's display component transforms have been updated. */ virtual void TrackedDeviceDisplayTransformUpdated( uint32_t unWhichDevice, HmdMatrix34_t eyeToHeadLeft, HmdMatrix34_t eyeToHeadRight ) = 0; + + /** Requests that SteamVR be restarted. The provided reason will be displayed to the user and should be in the current locale. */ + virtual void RequestRestart( const char *pchLocalizedReason, const char *pchExecutableToStart, const char *pchArguments, const char *pchWorkingDirectory ) = 0; }; static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_005"; diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so index f1951657..4e0e7205 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 f0de3c90..e4676c9d 100755 Binary files a/lib/linux64/libopenvr_api.so and b/lib/linux64/libopenvr_api.so differ diff --git a/samples/bin/linux64/libopenvr_api.so b/samples/bin/linux64/libopenvr_api.so index 7ac901f1..35da7554 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 0c651536..b3c2569b 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 39cbaf34..66d492bb 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 ca357662..7c9a0b17 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 a3cddc37..14d4b8b0 100644 --- a/src/vrcommon/hmderrors_public.cpp +++ b/src/vrcommon/hmderrors_public.cpp @@ -165,6 +165,7 @@ const char *GetIDForVRInitError( vr::EVRInitError eError ) RETURN_ENUM_AS_STRING( VRInitError_Init_USBServiceBusy ); RETURN_ENUM_AS_STRING( VRInitError_Init_VRWebHelperStartupFailed ); RETURN_ENUM_AS_STRING( VRInitError_Init_TrackerManagerInitFailed ); + RETURN_ENUM_AS_STRING( VRInitError_Init_AlreadyRunning ); RETURN_ENUM_AS_STRING( VRInitError_Driver_Failed ); RETURN_ENUM_AS_STRING( VRInitError_Driver_Unknown ); diff --git a/src/vrcommon/pathtools_public.cpp b/src/vrcommon/pathtools_public.cpp index ab299d29..3426c773 100644 --- a/src/vrcommon/pathtools_public.cpp +++ b/src/vrcommon/pathtools_public.cpp @@ -700,6 +700,28 @@ std::string Path_ReadTextFile( const std::string &strFilename ) } +bool Path_MakeWritable( const std::string &strFilename ) +{ +#if defined ( _WIN32 ) + std::wstring wstrFilename = UTF8to16( strFilename.c_str() ); + + DWORD dwAttrs = GetFileAttributesW( wstrFilename.c_str() ); + if ( dwAttrs != INVALID_FILE_ATTRIBUTES && ( dwAttrs & FILE_ATTRIBUTE_READONLY ) ) + { + return SetFileAttributesW( wstrFilename.c_str(), dwAttrs & ~FILE_ATTRIBUTE_READONLY ); + } +#else + struct stat sb; + + if ( stat( strFilename.c_str(), &sb ) == 0 && !( sb.st_mode & S_IWUSR ) ) + { + return ( chmod( strFilename.c_str(), sb.st_mode | S_IWUSR ) == 0 ); + } +#endif + + return true; +} + bool Path_WriteStringToTextFile( const std::string &strFilename, const char *pchData ) { FILE *f; diff --git a/src/vrcommon/pathtools_public.h b/src/vrcommon/pathtools_public.h index 4283a9ba..9bf9ce10 100644 --- a/src/vrcommon/pathtools_public.h +++ b/src/vrcommon/pathtools_public.h @@ -83,6 +83,9 @@ bool Path_Exists( const std::string & sPath ); std::string Path_FindParentDirectoryRecursively( const std::string &strStartDirectory, const std::string &strDirectoryName ); std::string Path_FindParentSubDirectoryRecursively( const std::string &strStartDirectory, const std::string &strDirectoryName ); +/** Make a text file writable. */ +bool Path_MakeWritable( const std::string &strFilename ); + /** Path operations to read or write text/binary files */ unsigned char * Path_ReadBinaryFile( const std::string &strFilename, int *pSize ); uint32_t Path_ReadBinaryFile( const std::string &strFilename, unsigned char *pBuffer, uint32_t unSize );