Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/openvr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Ludwig <joe@valvesoftware.com>2019-12-28 03:08:24 +0300
committerJeremy Selan <jeremy.selan@gmail.com>2020-01-07 05:01:42 +0300
commit39205f6b281a6131d1373d0217c1ab9ed19735ea (patch)
tree94610f937f18b0efa9969b4eb46bbef8841aca99
parent176b58f6ccaaae3e9d14efaf612c50b72ec5da76 (diff)
**OpenVR SDK 1.9.16**v1.9.16
IVRDriverInput: * Added TrackedControllerRole_Stylus, which allows a device to appear as /user/stylus in the binding system. IVRSettings: * Removed sync function. Saving of settings is controlled automatically by the system now. All existing calls to Sync can be deleted. Calls to sync using old APIs do nothing. IVRCompositor: * Added the ability for apps to skin the construct during loading transitions using a single model (limit 65k vertices) and a single texture (rendered unlit). See https://github.com/ValveSoftware/openvr/wiki/Compositor-Skinning for details. IVROverlay: * Added transform types for dashboard tabs and dashboard thumbs. These no longer use absolute transforms, so they no longer have getters for their transforms. * Added SetOverlayTransformCursor, which will set an overlay's transform to "cursor", which means it will be centered around its hotspot and automatically positioned by the laser mouse system. * Added GetOverlayTransformCursor in case an application needs to read back the cursor hotspot of a cursor. * Added SetOverlayCursor, which allows an overlay to specify which cursor overlay should be used whenever the laser mouse is pointed at that overlay. The desktop overlay uses this to show custom cursors based on context. * Added SetOverlayCursorPositionOverride, which lets an overlay set the position to show its cursor at a position that is independent from where the laser mouse is pointing. The desktop overlay uses this to allow the physical mouse to override the laser mouse. * Added ClearOverlayCursorPositionOverride, which clears any cursor position override on the overlay and returns it to using the laser mouse position. * Added TriggerLaserMouseHapticVibration, which will trigger a haptic vibration on the laser mouse device in the context of a particular transform. [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 5586053]
-rwxr-xr-xbin/linux32/libopenvr_api.sobin309204 -> 321663 bytes
-rwxr-xr-xbin/linux32/libopenvr_api.so.dbgbin2149901 -> 2209696 bytes
-rwxr-xr-xbin/linux64/libopenvr_api.sobin307835 -> 324888 bytes
-rwxr-xr-xbin/linux64/libopenvr_api.so.dbgbin2694032 -> 2766861 bytes
-rw-r--r--bin/win32/openvr_api.dllbin491808 -> 619472 bytes
-rw-r--r--bin/win32/openvr_api.dll.sigbin1450 -> 1450 bytes
-rw-r--r--bin/win32/openvr_api.pdbbin9900032 -> 10964992 bytes
-rw-r--r--bin/win64/openvr_api.dllbin599328 -> 815568 bytes
-rw-r--r--bin/win64/openvr_api.dll.sigbin1450 -> 1450 bytes
-rw-r--r--bin/win64/openvr_api.pdbbin9744384 -> 10825728 bytes
-rw-r--r--headers/openvr.h130
-rw-r--r--headers/openvr_api.cs190
-rw-r--r--headers/openvr_api.json180
-rw-r--r--headers/openvr_capi.h66
-rw-r--r--headers/openvr_driver.h80
-rwxr-xr-xlib/linux32/libopenvr_api.sobin2149901 -> 2209696 bytes
-rwxr-xr-xlib/linux64/libopenvr_api.sobin2694032 -> 2766861 bytes
-rw-r--r--samples/bin/linux32/libopenvr_api.sobin309204 -> 321663 bytes
-rw-r--r--samples/bin/linux64/libopenvr_api.sobin307835 -> 324888 bytes
-rw-r--r--samples/bin/win32/openvr_api.dllbin491808 -> 619472 bytes
-rw-r--r--samples/bin/win64/openvr_api.dllbin599328 -> 815568 bytes
-rw-r--r--src/vrcommon/pathtools_public.cpp2
-rw-r--r--src/vrcommon/strtools_public.cpp194
-rw-r--r--src/vrcommon/strtools_public.h8
-rw-r--r--src/vrcommon/vrpathregistry_public.cpp12
25 files changed, 621 insertions, 241 deletions
diff --git a/bin/linux32/libopenvr_api.so b/bin/linux32/libopenvr_api.so
index 71ec8d3..fb7284c 100755
--- a/bin/linux32/libopenvr_api.so
+++ b/bin/linux32/libopenvr_api.so
Binary files differ
diff --git a/bin/linux32/libopenvr_api.so.dbg b/bin/linux32/libopenvr_api.so.dbg
index 4a3e76c..40eed0e 100755
--- a/bin/linux32/libopenvr_api.so.dbg
+++ b/bin/linux32/libopenvr_api.so.dbg
Binary files differ
diff --git a/bin/linux64/libopenvr_api.so b/bin/linux64/libopenvr_api.so
index 8644b3f..1e035ae 100755
--- a/bin/linux64/libopenvr_api.so
+++ b/bin/linux64/libopenvr_api.so
Binary files differ
diff --git a/bin/linux64/libopenvr_api.so.dbg b/bin/linux64/libopenvr_api.so.dbg
index 6e0568c..ca2eded 100755
--- a/bin/linux64/libopenvr_api.so.dbg
+++ b/bin/linux64/libopenvr_api.so.dbg
Binary files differ
diff --git a/bin/win32/openvr_api.dll b/bin/win32/openvr_api.dll
index 94e3bd9..f5c6e9b 100644
--- a/bin/win32/openvr_api.dll
+++ b/bin/win32/openvr_api.dll
Binary files differ
diff --git a/bin/win32/openvr_api.dll.sig b/bin/win32/openvr_api.dll.sig
index 8755e12..df211b6 100644
--- a/bin/win32/openvr_api.dll.sig
+++ b/bin/win32/openvr_api.dll.sig
Binary files differ
diff --git a/bin/win32/openvr_api.pdb b/bin/win32/openvr_api.pdb
index 8aa66a1..94cd443 100644
--- a/bin/win32/openvr_api.pdb
+++ b/bin/win32/openvr_api.pdb
Binary files differ
diff --git a/bin/win64/openvr_api.dll b/bin/win64/openvr_api.dll
index b70ee19..bd76c2a 100644
--- a/bin/win64/openvr_api.dll
+++ b/bin/win64/openvr_api.dll
Binary files differ
diff --git a/bin/win64/openvr_api.dll.sig b/bin/win64/openvr_api.dll.sig
index 0eb2f80..9bb697a 100644
--- a/bin/win64/openvr_api.dll.sig
+++ b/bin/win64/openvr_api.dll.sig
Binary files differ
diff --git a/bin/win64/openvr_api.pdb b/bin/win64/openvr_api.pdb
index 0449eb4..9c39aea 100644
--- a/bin/win64/openvr_api.pdb
+++ b/bin/win64/openvr_api.pdb
Binary files differ
diff --git a/headers/openvr.h b/headers/openvr.h
index b538c47..0a2e008 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 = 8;
- static const uint32_t k_nSteamVRVersionBuild = 19;
+ static const uint32_t k_nSteamVRVersionMinor = 9;
+ static const uint32_t k_nSteamVRVersionBuild = 16;
} // namespace vr
// vrtypes.h
@@ -207,6 +207,7 @@ enum ETrackedControllerRole
TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand
TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection
TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill
+ TrackedControllerRole_Stylus = 5, // Tracked device is a stylus
TrackedControllerRole_Max = 5
};
@@ -276,6 +277,7 @@ static const PropertyTypeTag_t k_unInt32PropertyTag = 2;
static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
static const PropertyTypeTag_t k_unStringPropertyTag = 5;
+static const PropertyTypeTag_t k_unErrorPropertyTag = 6;
static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
@@ -355,6 +357,10 @@ enum ETrackedDeviceProperty
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
Prop_Firmware_RemindUpdate_Bool = 1047,
+ Prop_PeripheralApplicationVersion_Uint64 = 1048,
+ Prop_ManufacturerSerialNumber_String = 1049,
+ Prop_ComputedSerialNumber_String = 1050,
+ Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
@@ -432,13 +438,17 @@ enum ETrackedDeviceProperty
Prop_ExpectedControllerType_String = 2074,
Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
- Prop_HmdProvidesDisplaySettings_Bool = 2077,
-
+ Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
+ Prop_CameraSupportsCompatibilityModes_Bool = 2078,
Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver
Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user
Prop_DisplayColorMultLeft_Vector3 = 2082,
Prop_DisplayColorMultRight_Vector3 = 2083,
+ Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084,
+ Prop_DisplaySupportsAnalogGain_Bool = 2085,
+ Prop_DisplayMinAnalogGain_Float = 2086,
+ Prop_DisplayMaxAnalogGain_Float = 2087,
Prop_DashboardLayoutPathName_String = 2090,
Prop_DashboardScale_Float = 2091,
@@ -541,6 +551,8 @@ enum ETrackedPropertyError
TrackedProp_InvalidOperation = 11,
TrackedProp_CannotWriteToWildcards = 12,
TrackedProp_IPCReadFailure = 13,
+ TrackedProp_OutOfMemory = 14,
+ TrackedProp_InvalidContainer = 15,
};
/** Used to drive certain text in the UI when talking about the tracking system for the HMD */
@@ -796,6 +808,7 @@ enum EVREventType
VREvent_TrackersSectionSettingChanged = 866,
VREvent_LastKnownSectionSettingChanged = 867,
VREvent_DismissedWarningsSectionSettingChanged = 868,
+ VREvent_GpuSpeedSectionSettingChanged = 869,
VREvent_StatusUpdate = 900,
@@ -830,6 +843,7 @@ enum EVREventType
VREvent_Compositor_ApplicationResumed = 1416,
VREvent_Compositor_OutOfVideoMemory = 1417,
VREvent_Compositor_DisplayModeNotSupported = 1418, // k_pch_SteamVR_PreferredRefreshRate
+ VREvent_Compositor_StageOverrideReady = 1419,
VREvent_TrackedCamera_StartVideoStream = 1500,
VREvent_TrackedCamera_StopVideoStream = 1501,
@@ -852,6 +866,7 @@ enum EVREventType
VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate
VREvent_Input_TrackerActivated = 1706,
VREvent_Input_BindingsUpdated = 1707,
+ VREvent_Input_BindingSubscriptionChanged = 1708,
VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast
VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast
@@ -1143,6 +1158,7 @@ enum EShowUIType
ShowUI_Pairing = 3,
ShowUI_Settings = 4,
ShowUI_DebugCommands = 5,
+ ShowUI_FullControllerBinding = 6,
};
struct VREvent_ShowUI_t
@@ -2492,9 +2508,6 @@ namespace vr
public:
virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0;
- // Returns true if file sync occurred (force or settings dirty)
- virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
-
virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
@@ -2512,7 +2525,7 @@ namespace vr
};
//-----------------------------------------------------------------------------
- static const char * const IVRSettings_Version = "IVRSettings_002";
+ static const char * const IVRSettings_Version = "IVRSettings_003";
class CVRSettingHelper
{
@@ -2528,12 +2541,6 @@ namespace vr
return m_pSettings->GetSettingsErrorNameFromEnum( eError );
}
- // Returns true if file sync occurred (force or settings dirty)
- bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr )
- {
- return m_pSettings->Sync( bForce, peError );
- }
-
void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
{
m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError );
@@ -2636,6 +2643,7 @@ namespace vr
static const char * const k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye";
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
+ static const char * const k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph";
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
@@ -2650,7 +2658,6 @@ namespace vr
static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
- static const char * const k_pch_SteamVR_DebugInput = "debugInput";
static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
@@ -2800,6 +2807,9 @@ namespace vr
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
static const char * const k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings";
+ static const char * const k_pch_Dashboard_Position = "position";
+ static const char * const k_pch_Dashboard_DesktopScale = "desktopScale";
+ static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale";
//-----------------------------------------------------------------------------
// model skin keys
@@ -2829,6 +2839,7 @@ namespace vr
// per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type
static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
+ static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
//-----------------------------------------------------------------------------
@@ -2856,6 +2867,9 @@ namespace vr
static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation";
static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone";
+ //-----------------------------------------------------------------------------
+ // Log of GPU performance
+ static const char * const k_pch_GpuSpeed_Section = "GpuSpeed";
} // namespace vr
@@ -3049,6 +3063,7 @@ enum EVRCompositorError
VRCompositorError_IndexOutOfRange = 107,
VRCompositorError_AlreadySubmitted = 108,
VRCompositorError_InvalidBounds = 109,
+ VRCompositorError_AlreadySet = 110,
};
/** Timing mode passed to SetExplicitTimingMode(); see that function for documentation */
@@ -3089,6 +3104,32 @@ struct Compositor_CumulativeStats
uint32_t m_nNumReprojectedFramesTimedOut;
};
+struct Compositor_StageRenderSettings
+{
+ /** Primary color is applied as a tint to (i.e. multiplied with) the model's texture */
+ HmdColor_t m_PrimaryColor = { 1, 1, 1, 1 };
+ HmdColor_t m_SecondaryColor = { 1, 1, 1, 1 };
+
+ /** Vignette radius is in meters and is used to fade to the specified secondary solid color over
+ * that 3D distance from the origin of the playspace. */
+ float m_flVignetteInnerRadius = 0.0f;
+ float m_flVignetteOuterRadius = 0.0f;
+
+ /** Fades to the secondary color based on view incidence. This variable controls the linearity
+ * of the effect. It is mutually exclusive with vignette. Additionally, it treats the mesh as faceted. */
+ float m_flFresnelStrength = 0.0f;
+
+ /** Controls backface culling. */
+ bool m_bBackfaceCulling = false;
+
+ /** Converts the render model's texture to luma and applies to rgb equally. This is useful to
+ * combat compression artifacts that can occur on desaturated source material. */
+ bool m_bGreyscale = false;
+
+ /** Renders mesh as a wireframe. */
+ bool m_bWireframe = false;
+};
+
#pragma pack( pop )
/** Allows the application to interact with the compositor */
@@ -3295,9 +3336,18 @@ public:
/** Indicates whether or not the current scene focus app is currently loading. This is inferred from its use of FadeGrid to
* explicitly fade to the compositor to cover up the fact that it cannot render at a sustained full framerate during this time. */
virtual bool IsCurrentSceneFocusAppLoading() = 0;
+
+ /** Override the stage model used in the compositor to replace the grid. RenderModelPath is a full path the an OBJ file to load.
+ * This file will be loaded asynchronously from disk and uploaded to the gpu by the runtime. Once ready for rendering, the
+ * VREvent StageOverrideReady will be sent. Use FadeToGrid to reveal. Call ClearStageOverride to free the associated resources when finished. */
+ virtual EVRCompositorError SetStageOverride_Async( const char *pchRenderModelPath, const HmdMatrix34_t *pTransform = 0,
+ const Compositor_StageRenderSettings *pRenderSettings = 0, uint32_t nSizeOfRenderSettings = 0 ) = 0;
+
+ /** Resets the stage to its default user specified setting. */
+ virtual void ClearStageOverride() = 0;
};
-static const char * const IVRCompositor_Version = "IVRCompositor_022";
+static const char * const IVRCompositor_Version = "IVRCompositor_024";
} // namespace vr
@@ -3403,7 +3453,7 @@ namespace vr
static const uint32_t k_unVROverlayMaxNameLength = 128;
/** The maximum number of overlays that can exist in the system at one time. */
- static const uint32_t k_unMaxOverlayCount = 64;
+ static const uint32_t k_unMaxOverlayCount = 128;
/** The maximum number of overlay intersection mask primitives per overlay */
static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
@@ -3419,10 +3469,14 @@ namespace vr
/** Allows the caller to figure out which overlay transform getter to call. */
enum VROverlayTransformType
{
+ VROverlayTransform_Invalid = -1,
VROverlayTransform_Absolute = 0,
VROverlayTransform_TrackedDeviceRelative = 1,
VROverlayTransform_SystemOverlay = 2,
VROverlayTransform_TrackedComponent = 3,
+ VROverlayTransform_Cursor = 4,
+ VROverlayTransform_DashboardTab = 5,
+ VROverlayTransform_DashboardThumb = 6,
};
/** Overlay control settings */
@@ -3605,6 +3659,9 @@ namespace vr
/** Sets flag setting for a given overlay */
virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0;
+ /** Gets all the flags for a given overlay */
+ virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0;
+
/** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */
virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0;
@@ -3698,6 +3755,13 @@ namespace vr
/** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */
virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0;
+ /** Sets the hotspot for the specified overlay when that overlay is used as a cursor. These are in texture space with 0,0 in the upper left corner of
+ * the texture and 1,1 in the lower right corner of the texture. */
+ virtual EVROverlayError SetOverlayTransformCursor( VROverlayHandle_t ulCursorOverlayHandle, const HmdVector2_t *pvHotspot ) = 0;
+
+ /** Gets cursor hotspot/transform for the specified overlay */
+ virtual vr::EVROverlayError GetOverlayTransformCursor( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvHotspot ) = 0;
+
/** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */
virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
@@ -3746,6 +3810,23 @@ namespace vr
/** 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;
+ /** Sets a list of primitives to be used for controller ray intersection
+ * typically the size of the underlying UI in pixels (not in world space). */
+ virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
+
+ /** Triggers a haptic event on the laser mouse controller for the specified overlay */
+ virtual EVROverlayError TriggerLaserMouseHapticVibration( VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude ) = 0;
+
+ /** Sets the cursor to use for the specified overlay. This will be drawn instead of the generic blob when the laser mouse is pointed at the specified overlay */
+ virtual EVROverlayError SetOverlayCursor( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle ) = 0;
+
+ /** Sets the override cursor position to use for this overlay in overlay mouse coordinates. This position will be used to draw the cursor
+ * instead of whatever the laser mouse cursor position is. */
+ virtual EVROverlayError SetOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvCursor ) = 0;
+
+ /** Clears the override cursor position for this overlay */
+ virtual EVROverlayError ClearOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle ) = 0;
+
// ---------------------------------------------
// Overlay texture methods
// ---------------------------------------------
@@ -3762,7 +3843,7 @@ namespace vr
/** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data
* that can be sent. This function can only be called by the overlay's renderer process. */
- virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0;
+ virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel ) = 0;
/** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080.
* This function can only be called by the overlay's renderer process */
@@ -3835,16 +3916,6 @@ namespace vr
virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0;
// ---------------------------------------------
- // Overlay input methods
- // ---------------------------------------------
-
- /** Sets a list of primitives to be used for controller ray intersection
- * typically the size of the underlying UI in pixels (not in world space). */
- virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
-
- virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0;
-
- // ---------------------------------------------
// Message box methods
// ---------------------------------------------
@@ -3855,7 +3926,7 @@ namespace vr
virtual void CloseMessageOverlay() = 0;
};
- static const char * const IVROverlay_Version = "IVROverlay_021";
+ static const char * const IVROverlay_Version = "IVROverlay_022";
} // namespace vr
@@ -4760,6 +4831,7 @@ namespace vr
#endif // _OPENVR_API
+
namespace vr
{
#if !defined( OPENVR_INTERFACE_INTERNAL )
diff --git a/headers/openvr_api.cs b/headers/openvr_api.cs
index dedef36..2f30de3 100644
--- a/headers/openvr_api.cs
+++ b/headers/openvr_api.cs
@@ -889,6 +889,16 @@ public struct IVRCompositor
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsCurrentSceneFocusAppLoading IsCurrentSceneFocusAppLoading;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVRCompositorError _SetStageOverride_Async(string pchRenderModelPath, ref HmdMatrix34_t pTransform, ref Compositor_StageRenderSettings pRenderSettings, uint nSizeOfRenderSettings);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetStageOverride_Async SetStageOverride_Async;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate void _ClearStageOverride();
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ClearStageOverride ClearStageOverride;
+
}
[StructLayout(LayoutKind.Sequential)]
@@ -955,6 +965,11 @@ public struct IVROverlay
internal _GetOverlayFlag GetOverlayFlag;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetOverlayFlags GetOverlayFlags;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayColor(ulong ulOverlayHandle, float fRed, float fGreen, float fBlue);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayColor SetOverlayColor;
@@ -1090,6 +1105,16 @@ public struct IVROverlay
internal _SetOverlayTransformOverlayRelative SetOverlayTransformOverlayRelative;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _SetOverlayTransformCursor(ulong ulCursorOverlayHandle, ref HmdVector2_t pvHotspot);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetOverlayTransformCursor SetOverlayTransformCursor;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _GetOverlayTransformCursor(ulong ulOverlayHandle, ref HmdVector2_t pvHotspot);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _GetOverlayTransformCursor GetOverlayTransformCursor;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowOverlay ShowOverlay;
@@ -1155,6 +1180,31 @@ public struct IVROverlay
internal _GetOverlayDualAnalogTransform GetOverlayDualAnalogTransform;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _TriggerLaserMouseHapticVibration(ulong ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _TriggerLaserMouseHapticVibration TriggerLaserMouseHapticVibration;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _SetOverlayCursor(ulong ulOverlayHandle, ulong ulCursorHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetOverlayCursor SetOverlayCursor;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _SetOverlayCursorPositionOverride(ulong ulOverlayHandle, ref HmdVector2_t pvCursor);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _SetOverlayCursorPositionOverride SetOverlayCursorPositionOverride;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ internal delegate EVROverlayError _ClearOverlayCursorPositionOverride(ulong ulOverlayHandle);
+ [MarshalAs(UnmanagedType.FunctionPtr)]
+ internal _ClearOverlayCursorPositionOverride ClearOverlayCursorPositionOverride;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTexture SetOverlayTexture;
@@ -1165,7 +1215,7 @@ public struct IVROverlay
internal _ClearOverlayTexture ClearOverlayTexture;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unDepth);
+ internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unBytesPerPixel);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayRaw SetOverlayRaw;
@@ -1255,16 +1305,6 @@ public struct IVROverlay
internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _GetOverlayFlags GetOverlayFlags;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate VRMessageOverlayResponse _ShowMessageOverlay(string pchText, string pchCaption, string pchButton0Text, string pchButton1Text, string pchButton2Text, string pchButton3Text);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowMessageOverlay ShowMessageOverlay;
@@ -1400,11 +1440,6 @@ public struct IVRSettings
internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- internal delegate bool _Sync(bool bForce, ref EVRSettingsError peError);
- [MarshalAs(UnmanagedType.FunctionPtr)]
- internal _Sync Sync;
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetBool(string pchSection, string pchSettingsKey, bool bValue, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetBool SetBool;
@@ -2745,6 +2780,15 @@ public class CVRCompositor
bool result = FnTable.IsCurrentSceneFocusAppLoading();
return result;
}
+ public EVRCompositorError SetStageOverride_Async(string pchRenderModelPath,ref HmdMatrix34_t pTransform,ref Compositor_StageRenderSettings pRenderSettings,uint nSizeOfRenderSettings)
+ {
+ EVRCompositorError result = FnTable.SetStageOverride_Async(pchRenderModelPath,ref pTransform,ref pRenderSettings,nSizeOfRenderSettings);
+ return result;
+ }
+ public void ClearStageOverride()
+ {
+ FnTable.ClearStageOverride();
+ }
}
@@ -2820,6 +2864,12 @@ public class CVROverlay
EVROverlayError result = FnTable.GetOverlayFlag(ulOverlayHandle,eOverlayFlag,ref pbEnabled);
return result;
}
+ public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags)
+ {
+ pFlags = 0;
+ EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags);
+ return result;
+ }
public EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,float fGreen,float fBlue)
{
EVROverlayError result = FnTable.SetOverlayColor(ulOverlayHandle,fRed,fGreen,fBlue);
@@ -2966,6 +3016,16 @@ public class CVROverlay
EVROverlayError result = FnTable.SetOverlayTransformOverlayRelative(ulOverlayHandle,ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform);
return result;
}
+ public EVROverlayError SetOverlayTransformCursor(ulong ulCursorOverlayHandle,ref HmdVector2_t pvHotspot)
+ {
+ EVROverlayError result = FnTable.SetOverlayTransformCursor(ulCursorOverlayHandle,ref pvHotspot);
+ return result;
+ }
+ public EVROverlayError GetOverlayTransformCursor(ulong ulOverlayHandle,ref HmdVector2_t pvHotspot)
+ {
+ EVROverlayError result = FnTable.GetOverlayTransformCursor(ulOverlayHandle,ref pvHotspot);
+ return result;
+ }
public EVROverlayError ShowOverlay(ulong ulOverlayHandle)
{
EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle);
@@ -3058,6 +3118,31 @@ public class CVROverlay
EVROverlayError result = FnTable.GetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,ref pfRadius);
return result;
}
+ public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize)
+ {
+ EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
+ return result;
+ }
+ public EVROverlayError TriggerLaserMouseHapticVibration(ulong ulOverlayHandle,float fDurationSeconds,float fFrequency,float fAmplitude)
+ {
+ EVROverlayError result = FnTable.TriggerLaserMouseHapticVibration(ulOverlayHandle,fDurationSeconds,fFrequency,fAmplitude);
+ return result;
+ }
+ public EVROverlayError SetOverlayCursor(ulong ulOverlayHandle,ulong ulCursorHandle)
+ {
+ EVROverlayError result = FnTable.SetOverlayCursor(ulOverlayHandle,ulCursorHandle);
+ return result;
+ }
+ public EVROverlayError SetOverlayCursorPositionOverride(ulong ulOverlayHandle,ref HmdVector2_t pvCursor)
+ {
+ EVROverlayError result = FnTable.SetOverlayCursorPositionOverride(ulOverlayHandle,ref pvCursor);
+ return result;
+ }
+ public EVROverlayError ClearOverlayCursorPositionOverride(ulong ulOverlayHandle)
+ {
+ EVROverlayError result = FnTable.ClearOverlayCursorPositionOverride(ulOverlayHandle);
+ return result;
+ }
public EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture)
{
EVROverlayError result = FnTable.SetOverlayTexture(ulOverlayHandle,ref pTexture);
@@ -3068,9 +3153,9 @@ public class CVROverlay
EVROverlayError result = FnTable.ClearOverlayTexture(ulOverlayHandle);
return result;
}
- public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unDepth)
+ public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unBytesPerPixel)
{
- EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,pvBuffer,unWidth,unHeight,unDepth);
+ EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,pvBuffer,unWidth,unHeight,unBytesPerPixel);
return result;
}
public EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string pchFilePath)
@@ -3162,17 +3247,6 @@ public class CVROverlay
{
FnTable.SetKeyboardPositionForOverlay(ulOverlayHandle,avoidRect);
}
- public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize)
- {
- EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
- return result;
- }
- public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags)
- {
- pFlags = 0;
- EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags);
- return result;
- }
public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,string pchButton3Text)
{
VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchText,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text);
@@ -3346,11 +3420,6 @@ public class CVRSettings
IntPtr result = FnTable.GetSettingsErrorNameFromEnum(eError);
return Marshal.PtrToStringAnsi(result);
}
- public bool Sync(bool bForce,ref EVRSettingsError peError)
- {
- bool result = FnTable.Sync(bForce,ref peError);
- return result;
- }
public void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref EVRSettingsError peError)
{
FnTable.SetBool(pchSection,pchSettingsKey,bValue,ref peError);
@@ -3831,6 +3900,7 @@ public enum ETrackedControllerRole
RightHand = 2,
OptOut = 3,
Treadmill = 4,
+ Stylus = 5,
Max = 5,
}
public enum ETrackingUniverseOrigin
@@ -3897,6 +3967,10 @@ public enum ETrackedDeviceProperty
Prop_AdditionalSystemReportData_String = 1045,
Prop_CompositeFirmwareVersion_String = 1046,
Prop_Firmware_RemindUpdate_Bool = 1047,
+ Prop_PeripheralApplicationVersion_Uint64 = 1048,
+ Prop_ManufacturerSerialNumber_String = 1049,
+ Prop_ComputedSerialNumber_String = 1050,
+ Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
Prop_ReportsTimeSinceVSync_Bool = 2000,
Prop_SecondsFromVsyncToPhotons_Float = 2001,
Prop_DisplayFrequency_Float = 2002,
@@ -3971,11 +4045,16 @@ public enum ETrackedDeviceProperty
Prop_ExpectedControllerType_String = 2074,
Prop_HmdTrackingStyle_Int32 = 2075,
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
- Prop_HmdProvidesDisplaySettings_Bool = 2077,
+ Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
+ Prop_CameraSupportsCompatibilityModes_Bool = 2078,
Prop_DisplayAvailableFrameRates_Float_Array = 2080,
Prop_DisplaySupportsMultipleFramerates_Bool = 2081,
Prop_DisplayColorMultLeft_Vector3 = 2082,
Prop_DisplayColorMultRight_Vector3 = 2083,
+ Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084,
+ Prop_DisplaySupportsAnalogGain_Bool = 2085,
+ Prop_DisplayMinAnalogGain_Float = 2086,
+ Prop_DisplayMaxAnalogGain_Float = 2087,
Prop_DashboardLayoutPathName_String = 2090,
Prop_DashboardScale_Float = 2091,
Prop_IpdUIRangeMinMeters_Float = 2100,
@@ -4053,6 +4132,8 @@ public enum ETrackedPropertyError
TrackedProp_InvalidOperation = 11,
TrackedProp_CannotWriteToWildcards = 12,
TrackedProp_IPCReadFailure = 13,
+ TrackedProp_OutOfMemory = 14,
+ TrackedProp_InvalidContainer = 15,
}
public enum EHmdTrackingStyle
{
@@ -4197,6 +4278,7 @@ public enum EVREventType
VREvent_TrackersSectionSettingChanged = 866,
VREvent_LastKnownSectionSettingChanged = 867,
VREvent_DismissedWarningsSectionSettingChanged = 868,
+ VREvent_GpuSpeedSectionSettingChanged = 869,
VREvent_StatusUpdate = 900,
VREvent_WebInterface_InstallDriverCompleted = 950,
VREvent_MCImageUpdated = 1000,
@@ -4218,6 +4300,7 @@ public enum EVREventType
VREvent_Compositor_ApplicationResumed = 1416,
VREvent_Compositor_OutOfVideoMemory = 1417,
VREvent_Compositor_DisplayModeNotSupported = 1418,
+ VREvent_Compositor_StageOverrideReady = 1419,
VREvent_TrackedCamera_StartVideoStream = 1500,
VREvent_TrackedCamera_StopVideoStream = 1501,
VREvent_TrackedCamera_PauseVideoStream = 1502,
@@ -4236,6 +4319,7 @@ public enum EVREventType
VREvent_Input_ProgressUpdate = 1705,
VREvent_Input_TrackerActivated = 1706,
VREvent_Input_BindingsUpdated = 1707,
+ VREvent_Input_BindingSubscriptionChanged = 1708,
VREvent_SpatialAnchors_PoseUpdated = 1800,
VREvent_SpatialAnchors_DescriptorUpdated = 1801,
VREvent_SpatialAnchors_RequestPoseUpdate = 1802,
@@ -4297,6 +4381,7 @@ public enum EShowUIType
ShowUI_Pairing = 3,
ShowUI_Settings = 4,
ShowUI_DebugCommands = 5,
+ ShowUI_FullControllerBinding = 6,
}
public enum EHDCPError
{
@@ -4785,6 +4870,7 @@ public enum EVRCompositorError
IndexOutOfRange = 107,
AlreadySubmitted = 108,
InvalidBounds = 109,
+ AlreadySet = 110,
}
public enum EVRCompositorTimingMode
{
@@ -4800,10 +4886,14 @@ public enum VROverlayInputMethod
}
public enum VROverlayTransformType
{
+ VROverlayTransform_Invalid = -1,
VROverlayTransform_Absolute = 0,
VROverlayTransform_TrackedDeviceRelative = 1,
VROverlayTransform_SystemOverlay = 2,
VROverlayTransform_TrackedComponent = 3,
+ VROverlayTransform_Cursor = 4,
+ VROverlayTransform_DashboardTab = 5,
+ VROverlayTransform_DashboardThumb = 6,
}
public enum VROverlayFlags
{
@@ -5593,6 +5683,20 @@ public enum EVRDebugError
public uint m_nNumDroppedFramesTimedOut;
public uint m_nNumReprojectedFramesTimedOut;
}
+[StructLayout(LayoutKind.Sequential)] public struct Compositor_StageRenderSettings
+{
+ public HmdColor_t m_PrimaryColor;
+ public HmdColor_t m_SecondaryColor;
+ public float m_flVignetteInnerRadius;
+ public float m_flVignetteOuterRadius;
+ public float m_flFresnelStrength;
+ [MarshalAs(UnmanagedType.I1)]
+ public bool m_bBackfaceCulling;
+ [MarshalAs(UnmanagedType.I1)]
+ public bool m_bGreyscale;
+ [MarshalAs(UnmanagedType.I1)]
+ public bool m_bWireframe;
+}
[StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_t
{
public HmdVector3_t vSource;
@@ -6569,6 +6673,7 @@ public class OpenVR
public const uint k_unUint64PropertyTag = 3;
public const uint k_unBoolPropertyTag = 4;
public const uint k_unStringPropertyTag = 5;
+ public const uint k_unErrorPropertyTag = 6;
public const uint k_unHmdMatrix34PropertyTag = 20;
public const uint k_unHmdMatrix44PropertyTag = 21;
public const uint k_unHmdVector3PropertyTag = 22;
@@ -6604,12 +6709,12 @@ public class OpenVR
public const string IVRApplications_Version = "IVRApplications_007";
public const string IVRChaperone_Version = "IVRChaperone_003";
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
- public const string IVRCompositor_Version = "IVRCompositor_022";
+ public const string IVRCompositor_Version = "IVRCompositor_024";
public const uint k_unVROverlayMaxKeyLength = 128;
public const uint k_unVROverlayMaxNameLength = 128;
- public const uint k_unMaxOverlayCount = 64;
+ public const uint k_unMaxOverlayCount = 128;
public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
- public const string IVROverlay_Version = "IVROverlay_021";
+ public const string IVROverlay_Version = "IVROverlay_022";
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";
@@ -6619,7 +6724,7 @@ public class OpenVR
public const uint k_unNotificationTextMaxSize = 256;
public const string IVRNotifications_Version = "IVRNotifications_002";
public const uint k_unMaxSettingsKeyLength = 128;
- public const string IVRSettings_Version = "IVRSettings_002";
+ public const string IVRSettings_Version = "IVRSettings_003";
public const string k_pch_SteamVR_Section = "steamvr";
public const string k_pch_SteamVR_RequireHmd_String = "requireHmd";
public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
@@ -6658,6 +6763,7 @@ public class OpenVR
public const string k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye";
public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
public const string k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
+ public const string k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph";
public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
@@ -6672,7 +6778,6 @@ public class OpenVR
public const string k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
public const string k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
- public const string k_pch_SteamVR_DebugInput = "debugInput";
public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
@@ -6786,6 +6891,9 @@ public class OpenVR
public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
public const string k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
public const string k_pch_Dashboard_UseWebSettings = "useWebSettings";
+ public const string k_pch_Dashboard_Position = "position";
+ public const string k_pch_Dashboard_DesktopScale = "desktopScale";
+ public const string k_pch_Dashboard_DashboardScale = "dashboardScale";
public const string k_pch_modelskin_Section = "modelskins";
public const string k_pch_Driver_Enable_Bool = "enable";
public const string k_pch_Driver_LoadPriority_Int32 = "loadPriority";
@@ -6796,6 +6904,7 @@ public class OpenVR
public const string k_pch_TrackingOverride_Section = "TrackingOverrides";
public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
public const string k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
+ public const string k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
public const string k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
public const string k_pch_Trackers_Section = "trackers";
public const string k_pch_DesktopUI_Section = "DesktopUI";
@@ -6807,6 +6916,7 @@ public class OpenVR
public const string k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation";
public const string k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation";
public const string k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone";
+ public const string k_pch_GpuSpeed_Section = "GpuSpeed";
public const string IVRScreenshots_Version = "IVRScreenshots_001";
public const string IVRResources_Version = "IVRResources_001";
public const string IVRDriverManager_Version = "IVRDriverManager_001";
diff --git a/headers/openvr_api.json b/headers/openvr_api.json
index 7e414e0..b481362 100644
--- a/headers/openvr_api.json
+++ b/headers/openvr_api.json
@@ -83,6 +83,7 @@
,{"name": "TrackedControllerRole_RightHand","value": "2"}
,{"name": "TrackedControllerRole_OptOut","value": "3"}
,{"name": "TrackedControllerRole_Treadmill","value": "4"}
+ ,{"name": "TrackedControllerRole_Stylus","value": "5"}
,{"name": "TrackedControllerRole_Max","value": "5"}
]}
, {"enumname": "vr::ETrackingUniverseOrigin","values": [
@@ -146,6 +147,10 @@
,{"name": "Prop_AdditionalSystemReportData_String","value": "1045"}
,{"name": "Prop_CompositeFirmwareVersion_String","value": "1046"}
,{"name": "Prop_Firmware_RemindUpdate_Bool","value": "1047"}
+ ,{"name": "Prop_PeripheralApplicationVersion_Uint64","value": "1048"}
+ ,{"name": "Prop_ManufacturerSerialNumber_String","value": "1049"}
+ ,{"name": "Prop_ComputedSerialNumber_String","value": "1050"}
+ ,{"name": "Prop_EstimatedDeviceFirstUseTime_Int32","value": "1051"}
,{"name": "Prop_ReportsTimeSinceVSync_Bool","value": "2000"}
,{"name": "Prop_SecondsFromVsyncToPhotons_Float","value": "2001"}
,{"name": "Prop_DisplayFrequency_Float","value": "2002"}
@@ -220,11 +225,16 @@
,{"name": "Prop_ExpectedControllerType_String","value": "2074"}
,{"name": "Prop_HmdTrackingStyle_Int32","value": "2075"}
,{"name": "Prop_DriverProvidedChaperoneVisibility_Bool","value": "2076"}
- ,{"name": "Prop_HmdProvidesDisplaySettings_Bool","value": "2077"}
+ ,{"name": "Prop_HmdColumnCorrectionSettingPrefix_String","value": "2077"}
+ ,{"name": "Prop_CameraSupportsCompatibilityModes_Bool","value": "2078"}
,{"name": "Prop_DisplayAvailableFrameRates_Float_Array","value": "2080"}
,{"name": "Prop_DisplaySupportsMultipleFramerates_Bool","value": "2081"}
,{"name": "Prop_DisplayColorMultLeft_Vector3","value": "2082"}
,{"name": "Prop_DisplayColorMultRight_Vector3","value": "2083"}
+ ,{"name": "Prop_DisplaySupportsRuntimeFramerateChange_Bool","value": "2084"}
+ ,{"name": "Prop_DisplaySupportsAnalogGain_Bool","value": "2085"}
+ ,{"name": "Prop_DisplayMinAnalogGain_Float","value": "2086"}
+ ,{"name": "Prop_DisplayMaxAnalogGain_Float","value": "2087"}
,{"name": "Prop_DashboardLayoutPathName_String","value": "2090"}
,{"name": "Prop_DashboardScale_Float","value": "2091"}
,{"name": "Prop_IpdUIRangeMinMeters_Float","value": "2100"}
@@ -301,6 +311,8 @@
,{"name": "TrackedProp_InvalidOperation","value": "11"}
,{"name": "TrackedProp_CannotWriteToWildcards","value": "12"}
,{"name": "TrackedProp_IPCReadFailure","value": "13"}
+ ,{"name": "TrackedProp_OutOfMemory","value": "14"}
+ ,{"name": "TrackedProp_InvalidContainer","value": "15"}
]}
, {"enumname": "vr::EHmdTrackingStyle","values": [
{"name": "HmdTrackingStyle_Unknown","value": "0"}
@@ -441,6 +453,7 @@
,{"name": "VREvent_TrackersSectionSettingChanged","value": "866"}
,{"name": "VREvent_LastKnownSectionSettingChanged","value": "867"}
,{"name": "VREvent_DismissedWarningsSectionSettingChanged","value": "868"}
+ ,{"name": "VREvent_GpuSpeedSectionSettingChanged","value": "869"}
,{"name": "VREvent_StatusUpdate","value": "900"}
,{"name": "VREvent_WebInterface_InstallDriverCompleted","value": "950"}
,{"name": "VREvent_MCImageUpdated","value": "1000"}
@@ -462,6 +475,7 @@
,{"name": "VREvent_Compositor_ApplicationResumed","value": "1416"}
,{"name": "VREvent_Compositor_OutOfVideoMemory","value": "1417"}
,{"name": "VREvent_Compositor_DisplayModeNotSupported","value": "1418"}
+ ,{"name": "VREvent_Compositor_StageOverrideReady","value": "1419"}
,{"name": "VREvent_TrackedCamera_StartVideoStream","value": "1500"}
,{"name": "VREvent_TrackedCamera_StopVideoStream","value": "1501"}
,{"name": "VREvent_TrackedCamera_PauseVideoStream","value": "1502"}
@@ -480,6 +494,7 @@
,{"name": "VREvent_Input_ProgressUpdate","value": "1705"}
,{"name": "VREvent_Input_TrackerActivated","value": "1706"}
,{"name": "VREvent_Input_BindingsUpdated","value": "1707"}
+ ,{"name": "VREvent_Input_BindingSubscriptionChanged","value": "1708"}
,{"name": "VREvent_SpatialAnchors_PoseUpdated","value": "1800"}
,{"name": "VREvent_SpatialAnchors_DescriptorUpdated","value": "1801"}
,{"name": "VREvent_SpatialAnchors_RequestPoseUpdate","value": "1802"}
@@ -536,6 +551,7 @@
,{"name": "ShowUI_Pairing","value": "3"}
,{"name": "ShowUI_Settings","value": "4"}
,{"name": "ShowUI_DebugCommands","value": "5"}
+ ,{"name": "ShowUI_FullControllerBinding","value": "6"}
]}
, {"enumname": "vr::EHDCPError","values": [
{"name": "HDCPError_None","value": "0"}
@@ -994,6 +1010,7 @@
,{"name": "VRCompositorError_IndexOutOfRange","value": "107"}
,{"name": "VRCompositorError_AlreadySubmitted","value": "108"}
,{"name": "VRCompositorError_InvalidBounds","value": "109"}
+ ,{"name": "VRCompositorError_AlreadySet","value": "110"}
]}
, {"enumname": "vr::EVRCompositorTimingMode","values": [
{"name": "VRCompositorTimingMode_Implicit","value": "0"}
@@ -1006,10 +1023,14 @@
,{"name": "VROverlayInputMethod_DualAnalog","value": "2"}
]}
, {"enumname": "vr::VROverlayTransformType","values": [
- {"name": "VROverlayTransform_Absolute","value": "0"}
+ {"name": "VROverlayTransform_Invalid","value": "-1"}
+ ,{"name": "VROverlayTransform_Absolute","value": "0"}
,{"name": "VROverlayTransform_TrackedDeviceRelative","value": "1"}
,{"name": "VROverlayTransform_SystemOverlay","value": "2"}
,{"name": "VROverlayTransform_TrackedComponent","value": "3"}
+ ,{"name": "VROverlayTransform_Cursor","value": "4"}
+ ,{"name": "VROverlayTransform_DashboardTab","value": "5"}
+ ,{"name": "VROverlayTransform_DashboardThumb","value": "6"}
]}
, {"enumname": "vr::VROverlayFlags","values": [
{"name": "VROverlayFlags_NoDashboardTab","value": "8"}
@@ -1187,6 +1208,8 @@
,{
"constname": "k_unStringPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "5"}
,{
+ "constname": "k_unErrorPropertyTag","consttype": "const PropertyTypeTag_t", "constval": "6"}
+,{
"constname": "k_unHmdMatrix34PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "20"}
,{
"constname": "k_unHmdMatrix44PropertyTag","consttype": "const PropertyTypeTag_t", "constval": "21"}
@@ -1257,17 +1280,17 @@
,{
"constname": "IVRChaperoneSetup_Version","consttype": "const char *const", "constval": "IVRChaperoneSetup_006"}
,{
- "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_022"}
+ "constname": "IVRCompositor_Version","consttype": "const char *const", "constval": "IVRCompositor_024"}
,{
"constname": "k_unVROverlayMaxKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
"constname": "k_unVROverlayMaxNameLength","consttype": "const uint32_t", "constval": "128"}
,{
- "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "64"}
+ "constname": "k_unMaxOverlayCount","consttype": "const uint32_t", "constval": "128"}
,{
"constname": "k_unMaxOverlayIntersectionMaskPrimitivesCount","consttype": "const uint32_t", "constval": "32"}
,{
- "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_021"}
+ "constname": "IVROverlay_Version","consttype": "const char *const", "constval": "IVROverlay_022"}
,{
"constname": "k_pch_Controller_Component_GDC2015","consttype": "const char *const", "constval": "gdc2015"}
,{
@@ -1287,7 +1310,7 @@
,{
"constname": "k_unMaxSettingsKeyLength","consttype": "const uint32_t", "constval": "128"}
,{
- "constname": "IVRSettings_Version","consttype": "const char *const", "constval": "IVRSettings_002"}
+ "constname": "IVRSettings_Version","consttype": "const char *const", "constval": "IVRSettings_003"}
,{
"constname": "k_pch_SteamVR_Section","consttype": "const char *const", "constval": "steamvr"}
,{
@@ -1365,6 +1388,8 @@
,{
"constname": "k_pch_SteamVR_MirrorViewGeometryMaximized_String","consttype": "const char *const", "constval": "mirrorViewGeometryMaximized"}
,{
+ "constname": "k_pch_SteamVR_PerfGraphVisibility_Bool","consttype": "const char *const", "constval": "showPerfGraph"}
+,{
"constname": "k_pch_SteamVR_StartMonitorFromAppLaunch","consttype": "const char *const", "constval": "startMonitorFromAppLaunch"}
,{
"constname": "k_pch_SteamVR_StartCompositorFromAppLaunch_Bool","consttype": "const char *const", "constval": "startCompositorFromAppLaunch"}
@@ -1393,8 +1418,6 @@
,{
"constname": "k_pch_SteamVR_ForceWindows32bitVRMonitor","consttype": "const char *const", "constval": "forceWindows32BitVRMonitor"}
,{
- "constname": "k_pch_SteamVR_DebugInput","consttype": "const char *const", "constval": "debugInput"}
-,{
"constname": "k_pch_SteamVR_DebugInputBinding","consttype": "const char *const", "constval": "debugInputBinding"}
,{
"constname": "k_pch_SteamVR_DoNotFadeToGrid","consttype": "const char *const", "constval": "doNotFadeToGrid"}
@@ -1621,6 +1644,12 @@
,{
"constname": "k_pch_Dashboard_UseWebSettings","consttype": "const char *const", "constval": "useWebSettings"}
,{
+ "constname": "k_pch_Dashboard_Position","consttype": "const char *const", "constval": "position"}
+,{
+ "constname": "k_pch_Dashboard_DesktopScale","consttype": "const char *const", "constval": "desktopScale"}
+,{
+ "constname": "k_pch_Dashboard_DashboardScale","consttype": "const char *const", "constval": "dashboardScale"}
+,{
"constname": "k_pch_modelskin_Section","consttype": "const char *const", "constval": "modelskins"}
,{
"constname": "k_pch_Driver_Enable_Bool","consttype": "const char *const", "constval": "enable"}
@@ -1641,6 +1670,8 @@
,{
"constname": "k_pch_App_BindingCurrentURLSuffix_String","consttype": "const char *const", "constval": "CurrentURL"}
,{
+ "constname": "k_pch_App_BindingPreviousURLSuffix_String","consttype": "const char *const", "constval": "PreviousURL"}
+,{
"constname": "k_pch_App_NeedToUpdateAutosaveSuffix_Bool","consttype": "const char *const", "constval": "NeedToUpdateAutosave"}
,{
"constname": "k_pch_Trackers_Section","consttype": "const char *const", "constval": "trackers"}
@@ -1663,6 +1694,8 @@
,{
"constname": "k_pch_Input_ThumbstickDeadzone_Float","consttype": "const char *const", "constval": "thumbstickDeadzone"}
,{
+ "constname": "k_pch_GpuSpeed_Section","consttype": "const char *const", "constval": "GpuSpeed"}
+,{
"constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"}
,{
"constname": "IVRResources_Version","consttype": "const char *const", "constval": "IVRResources_001"}
@@ -2003,6 +2036,15 @@
{ "fieldname": "m_nNumFramePresentsTimedOut", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumDroppedFramesTimedOut", "fieldtype": "uint32_t"},
{ "fieldname": "m_nNumReprojectedFramesTimedOut", "fieldtype": "uint32_t"}]}
+,{"struct": "vr::Compositor_StageRenderSettings","fields": [
+{ "fieldname": "m_PrimaryColor", "fieldtype": "struct vr::HmdColor_t"},
+{ "fieldname": "m_SecondaryColor", "fieldtype": "struct vr::HmdColor_t"},
+{ "fieldname": "m_flVignetteInnerRadius", "fieldtype": "float"},
+{ "fieldname": "m_flVignetteOuterRadius", "fieldtype": "float"},
+{ "fieldname": "m_flFresnelStrength", "fieldtype": "float"},
+{ "fieldname": "m_bBackfaceCulling", "fieldtype": "_Bool"},
+{ "fieldname": "m_bGreyscale", "fieldtype": "_Bool"},
+{ "fieldname": "m_bWireframe", "fieldtype": "_Bool"}]}
,{"struct": "vr::VROverlayIntersectionParams_t","fields": [
{ "fieldname": "vSource", "fieldtype": "struct vr::HmdVector3_t"},
{ "fieldname": "vDirection", "fieldtype": "struct vr::HmdVector3_t"},
@@ -3495,6 +3537,22 @@
"returntype": "bool"
}
,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "SetStageOverride_Async",
+ "returntype": "vr::EVRCompositorError",
+ "params": [
+{ "paramname": "pchRenderModelPath" ,"paramtype": "const char *"},
+{ "paramname": "pTransform" ,"paramtype": "const struct vr::HmdMatrix34_t *"},
+{ "paramname": "pRenderSettings" ,"paramtype": "const struct vr::Compositor_StageRenderSettings *"},
+{ "paramname": "nSizeOfRenderSettings" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVRCompositor",
+ "methodname": "ClearStageOverride",
+ "returntype": "void"
+}
+,{
"classname": "vr::IVROverlay",
"methodname": "FindOverlay",
"returntype": "vr::EVROverlayError",
@@ -3611,6 +3669,15 @@
}
,{
"classname": "vr::IVROverlay",
+ "methodname": "GetOverlayFlags",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pFlags" ,"paramtype": "uint32_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
"methodname": "SetOverlayColor",
"returntype": "vr::EVROverlayError",
"params": [
@@ -3871,6 +3938,24 @@
}
,{
"classname": "vr::IVROverlay",
+ "methodname": "SetOverlayTransformCursor",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulCursorOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pvHotspot" ,"paramtype": "const struct vr::HmdVector2_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "GetOverlayTransformCursor",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pvHotspot" ,"paramtype": "struct vr::HmdVector2_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
"methodname": "ShowOverlay",
"returntype": "vr::EVROverlayError",
"params": [
@@ -3992,6 +4077,54 @@
}
,{
"classname": "vr::IVROverlay",
+ "methodname": "SetOverlayIntersectionMask",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pMaskPrimitives" ,"paramtype": "struct vr::VROverlayIntersectionMaskPrimitive_t *"},
+{ "paramname": "unNumMaskPrimitives" ,"paramtype": "uint32_t"},
+{ "paramname": "unPrimitiveSize" ,"paramtype": "uint32_t"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "TriggerLaserMouseHapticVibration",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "fDurationSeconds" ,"paramtype": "float"},
+{ "paramname": "fFrequency" ,"paramtype": "float"},
+{ "paramname": "fAmplitude" ,"paramtype": "float"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "SetOverlayCursor",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "ulCursorHandle" ,"paramtype": "vr::VROverlayHandle_t"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "SetOverlayCursorPositionOverride",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
+{ "paramname": "pvCursor" ,"paramtype": "const struct vr::HmdVector2_t *"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
+ "methodname": "ClearOverlayCursorPositionOverride",
+ "returntype": "vr::EVROverlayError",
+ "params": [
+{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"}
+ ]
+}
+,{
+ "classname": "vr::IVROverlay",
"methodname": "SetOverlayTexture",
"returntype": "vr::EVROverlayError",
"params": [
@@ -4016,7 +4149,7 @@
{ "paramname": "pvBuffer" ,"paramtype": "void *"},
{ "paramname": "unWidth" ,"paramtype": "uint32_t"},
{ "paramname": "unHeight" ,"paramtype": "uint32_t"},
-{ "paramname": "unDepth" ,"paramtype": "uint32_t"}
+{ "paramname": "unBytesPerPixel" ,"paramtype": "uint32_t"}
]
}
,{
@@ -4181,26 +4314,6 @@
}
,{
"classname": "vr::IVROverlay",
- "methodname": "SetOverlayIntersectionMask",
- "returntype": "vr::EVROverlayError",
- "params": [
-{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
-{ "paramname": "pMaskPrimitives" ,"paramtype": "struct vr::VROverlayIntersectionMaskPrimitive_t *"},
-{ "paramname": "unNumMaskPrimitives" ,"paramtype": "uint32_t"},
-{ "paramname": "unPrimitiveSize" ,"paramtype": "uint32_t"}
- ]
-}
-,{
- "classname": "vr::IVROverlay",
- "methodname": "GetOverlayFlags",
- "returntype": "vr::EVROverlayError",
- "params": [
-{ "paramname": "ulOverlayHandle" ,"paramtype": "vr::VROverlayHandle_t"},
-{ "paramname": "pFlags" ,"paramtype": "uint32_t *"}
- ]
-}
-,{
- "classname": "vr::IVROverlay",
"methodname": "ShowMessageOverlay",
"returntype": "vr::VRMessageOverlayResponse",
"params": [
@@ -4427,15 +4540,6 @@
}
,{
"classname": "vr::IVRSettings",
- "methodname": "Sync",
- "returntype": "bool",
- "params": [
-{ "paramname": "bForce" ,"paramtype": "bool"},
-{ "paramname": "peError" ,"paramtype": "vr::EVRSettingsError *"}
- ]
-}
-,{
- "classname": "vr::IVRSettings",
"methodname": "SetBool",
"returntype": "void",
"params": [
diff --git a/headers/openvr_capi.h b/headers/openvr_capi.h
index f018493..c636d53 100644
--- a/headers/openvr_capi.h
+++ b/headers/openvr_capi.h
@@ -77,6 +77,7 @@ static const unsigned int k_unInt32PropertyTag = 2;
static const unsigned int k_unUint64PropertyTag = 3;
static const unsigned int k_unBoolPropertyTag = 4;
static const unsigned int k_unStringPropertyTag = 5;
+static const unsigned int k_unErrorPropertyTag = 6;
static const unsigned int k_unHmdMatrix34PropertyTag = 20;
static const unsigned int k_unHmdMatrix44PropertyTag = 21;
static const unsigned int k_unHmdVector3PropertyTag = 22;
@@ -112,12 +113,12 @@ static const char * k_pch_MimeType_GameTheater = "vr/game_theater";
static const char * IVRApplications_Version = "IVRApplications_007";
static const char * IVRChaperone_Version = "IVRChaperone_003";
static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
-static const char * IVRCompositor_Version = "IVRCompositor_022";
+static const char * IVRCompositor_Version = "IVRCompositor_024";
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_unMaxOverlayCount = 128;
static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
-static const char * IVROverlay_Version = "IVROverlay_021";
+static const char * IVROverlay_Version = "IVROverlay_022";
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";
@@ -127,7 +128,7 @@ static const char * IVRRenderModels_Version = "IVRRenderModels_006";
static const unsigned int k_unNotificationTextMaxSize = 256;
static const char * IVRNotifications_Version = "IVRNotifications_002";
static const unsigned int k_unMaxSettingsKeyLength = 128;
-static const char * IVRSettings_Version = "IVRSettings_002";
+static const char * IVRSettings_Version = "IVRSettings_003";
static const char * k_pch_SteamVR_Section = "steamvr";
static const char * k_pch_SteamVR_RequireHmd_String = "requireHmd";
static const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
@@ -166,6 +167,7 @@ static const char * k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDispl
static const char * k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye";
static const char * k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
static const char * k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
+static const char * k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph";
static const char * k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
static const char * k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
static const char * k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
@@ -180,7 +182,6 @@ static const char * k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulk
static const char * k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
static const char * k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
static const char * k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
-static const char * k_pch_SteamVR_DebugInput = "debugInput";
static const char * k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
static const char * k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
static const char * k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
@@ -294,6 +295,9 @@ static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
static const char * k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
static const char * k_pch_Dashboard_UseWebSettings = "useWebSettings";
+static const char * k_pch_Dashboard_Position = "position";
+static const char * k_pch_Dashboard_DesktopScale = "desktopScale";
+static const char * k_pch_Dashboard_DashboardScale = "dashboardScale";
static const char * k_pch_modelskin_Section = "modelskins";
static const char * k_pch_Driver_Enable_Bool = "enable";
static const char * k_pch_Driver_LoadPriority_Int32 = "loadPriority";
@@ -304,6 +308,7 @@ static const char * k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort";
static const char * k_pch_TrackingOverride_Section = "TrackingOverrides";
static const char * k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
static const char * k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
+static const char * k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
static const char * k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
static const char * k_pch_Trackers_Section = "trackers";
static const char * k_pch_DesktopUI_Section = "DesktopUI";
@@ -315,6 +320,7 @@ static const char * k_pch_Input_Section = "input";
static const char * k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation";
static const char * k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation";
static const char * k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone";
+static const char * k_pch_GpuSpeed_Section = "GpuSpeed";
static const char * IVRScreenshots_Version = "IVRScreenshots_001";
static const char * IVRResources_Version = "IVRResources_001";
static const char * IVRDriverManager_Version = "IVRDriverManager_001";
@@ -384,6 +390,7 @@ typedef enum ETrackedControllerRole
ETrackedControllerRole_TrackedControllerRole_RightHand = 2,
ETrackedControllerRole_TrackedControllerRole_OptOut = 3,
ETrackedControllerRole_TrackedControllerRole_Treadmill = 4,
+ ETrackedControllerRole_TrackedControllerRole_Stylus = 5,
ETrackedControllerRole_TrackedControllerRole_Max = 5,
} ETrackedControllerRole;
@@ -453,6 +460,10 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_AdditionalSystemReportData_String = 1045,
ETrackedDeviceProperty_Prop_CompositeFirmwareVersion_String = 1046,
ETrackedDeviceProperty_Prop_Firmware_RemindUpdate_Bool = 1047,
+ ETrackedDeviceProperty_Prop_PeripheralApplicationVersion_Uint64 = 1048,
+ ETrackedDeviceProperty_Prop_ManufacturerSerialNumber_String = 1049,
+ ETrackedDeviceProperty_Prop_ComputedSerialNumber_String = 1050,
+ ETrackedDeviceProperty_Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000,
ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001,
ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002,
@@ -527,11 +538,16 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_ExpectedControllerType_String = 2074,
ETrackedDeviceProperty_Prop_HmdTrackingStyle_Int32 = 2075,
ETrackedDeviceProperty_Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
- ETrackedDeviceProperty_Prop_HmdProvidesDisplaySettings_Bool = 2077,
+ ETrackedDeviceProperty_Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
+ ETrackedDeviceProperty_Prop_CameraSupportsCompatibilityModes_Bool = 2078,
ETrackedDeviceProperty_Prop_DisplayAvailableFrameRates_Float_Array = 2080,
ETrackedDeviceProperty_Prop_DisplaySupportsMultipleFramerates_Bool = 2081,
ETrackedDeviceProperty_Prop_DisplayColorMultLeft_Vector3 = 2082,
ETrackedDeviceProperty_Prop_DisplayColorMultRight_Vector3 = 2083,
+ ETrackedDeviceProperty_Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084,
+ ETrackedDeviceProperty_Prop_DisplaySupportsAnalogGain_Bool = 2085,
+ ETrackedDeviceProperty_Prop_DisplayMinAnalogGain_Float = 2086,
+ ETrackedDeviceProperty_Prop_DisplayMaxAnalogGain_Float = 2087,
ETrackedDeviceProperty_Prop_DashboardLayoutPathName_String = 2090,
ETrackedDeviceProperty_Prop_DashboardScale_Float = 2091,
ETrackedDeviceProperty_Prop_IpdUIRangeMinMeters_Float = 2100,
@@ -610,6 +626,8 @@ typedef enum ETrackedPropertyError
ETrackedPropertyError_TrackedProp_InvalidOperation = 11,
ETrackedPropertyError_TrackedProp_CannotWriteToWildcards = 12,
ETrackedPropertyError_TrackedProp_IPCReadFailure = 13,
+ ETrackedPropertyError_TrackedProp_OutOfMemory = 14,
+ ETrackedPropertyError_TrackedProp_InvalidContainer = 15,
} ETrackedPropertyError;
typedef enum EHmdTrackingStyle
@@ -758,6 +776,7 @@ typedef enum EVREventType
EVREventType_VREvent_TrackersSectionSettingChanged = 866,
EVREventType_VREvent_LastKnownSectionSettingChanged = 867,
EVREventType_VREvent_DismissedWarningsSectionSettingChanged = 868,
+ EVREventType_VREvent_GpuSpeedSectionSettingChanged = 869,
EVREventType_VREvent_StatusUpdate = 900,
EVREventType_VREvent_WebInterface_InstallDriverCompleted = 950,
EVREventType_VREvent_MCImageUpdated = 1000,
@@ -779,6 +798,7 @@ typedef enum EVREventType
EVREventType_VREvent_Compositor_ApplicationResumed = 1416,
EVREventType_VREvent_Compositor_OutOfVideoMemory = 1417,
EVREventType_VREvent_Compositor_DisplayModeNotSupported = 1418,
+ EVREventType_VREvent_Compositor_StageOverrideReady = 1419,
EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500,
EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501,
EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502,
@@ -797,6 +817,7 @@ typedef enum EVREventType
EVREventType_VREvent_Input_ProgressUpdate = 1705,
EVREventType_VREvent_Input_TrackerActivated = 1706,
EVREventType_VREvent_Input_BindingsUpdated = 1707,
+ EVREventType_VREvent_Input_BindingSubscriptionChanged = 1708,
EVREventType_VREvent_SpatialAnchors_PoseUpdated = 1800,
EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801,
EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802,
@@ -863,6 +884,7 @@ typedef enum EShowUIType
EShowUIType_ShowUI_Pairing = 3,
EShowUIType_ShowUI_Settings = 4,
EShowUIType_ShowUI_DebugCommands = 5,
+ EShowUIType_ShowUI_FullControllerBinding = 6,
} EShowUIType;
typedef enum EHDCPError
@@ -1381,6 +1403,7 @@ typedef enum EVRCompositorError
EVRCompositorError_VRCompositorError_IndexOutOfRange = 107,
EVRCompositorError_VRCompositorError_AlreadySubmitted = 108,
EVRCompositorError_VRCompositorError_InvalidBounds = 109,
+ EVRCompositorError_VRCompositorError_AlreadySet = 110,
} EVRCompositorError;
typedef enum EVRCompositorTimingMode
@@ -1399,10 +1422,14 @@ typedef enum VROverlayInputMethod
typedef enum VROverlayTransformType
{
+ VROverlayTransformType_VROverlayTransform_Invalid = -1,
VROverlayTransformType_VROverlayTransform_Absolute = 0,
VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1,
VROverlayTransformType_VROverlayTransform_SystemOverlay = 2,
VROverlayTransformType_VROverlayTransform_TrackedComponent = 3,
+ VROverlayTransformType_VROverlayTransform_Cursor = 4,
+ VROverlayTransformType_VROverlayTransform_DashboardTab = 5,
+ VROverlayTransformType_VROverlayTransform_DashboardThumb = 6,
} VROverlayTransformType;
typedef enum VROverlayFlags
@@ -2108,6 +2135,18 @@ typedef struct Compositor_CumulativeStats
uint32_t m_nNumReprojectedFramesTimedOut;
} Compositor_CumulativeStats;
+typedef struct Compositor_StageRenderSettings
+{
+ struct HmdColor_t m_PrimaryColor;
+ struct HmdColor_t m_SecondaryColor;
+ float m_flVignetteInnerRadius;
+ float m_flVignetteOuterRadius;
+ float m_flFresnelStrength;
+ bool m_bBackfaceCulling;
+ bool m_bGreyscale;
+ bool m_bWireframe;
+} Compositor_StageRenderSettings;
+
typedef struct VROverlayIntersectionParams_t
{
struct HmdVector3_t vSource;
@@ -2551,6 +2590,8 @@ struct VR_IVRCompositor_FnTable
bool (OPENVR_FNTABLE_CALLTYPE *IsMotionSmoothingEnabled)();
bool (OPENVR_FNTABLE_CALLTYPE *IsMotionSmoothingSupported)();
bool (OPENVR_FNTABLE_CALLTYPE *IsCurrentSceneFocusAppLoading)();
+ EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetStageOverride_Async)(char * pchRenderModelPath, struct HmdMatrix34_t * pTransform, struct Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings);
+ void (OPENVR_FNTABLE_CALLTYPE *ClearStageOverride)();
};
struct VR_IVROverlay_FnTable
@@ -2567,6 +2608,7 @@ struct VR_IVROverlay_FnTable
uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha);
@@ -2594,6 +2636,8 @@ struct VR_IVROverlay_FnTable
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, struct HmdMatrix34_t * pmatParentOverlayToOverlayTransform);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, struct HmdMatrix34_t * pmatParentOverlayToOverlayTransform);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformCursor)(VROverlayHandle_t ulCursorOverlayHandle, struct HmdVector2_t * pvHotspot);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformCursor)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvHotspot);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle);
bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle);
@@ -2607,9 +2651,14 @@ struct VR_IVROverlay_FnTable
bool (OPENVR_FNTABLE_CALLTYPE *IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t * pvCenter, float fRadius);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, struct HmdVector2_t * pvCenter, float * pfRadius);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *TriggerLaserMouseHapticVibration)(VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCursor)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvCursor);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle);
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);
+ EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, struct VRTextureBounds_t * pTextureBounds);
EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle);
@@ -2627,8 +2676,6 @@ struct VR_IVROverlay_FnTable
void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)();
void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform);
void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect);
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize);
- EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags);
VRMessageOverlayResponse (OPENVR_FNTABLE_CALLTYPE *ShowMessageOverlay)(char * pchText, char * pchCaption, char * pchButton0Text, char * pchButton1Text, char * pchButton2Text, char * pchButton3Text);
void (OPENVR_FNTABLE_CALLTYPE *CloseMessageOverlay)();
};
@@ -2665,7 +2712,6 @@ struct VR_IVRNotifications_FnTable
struct VR_IVRSettings_FnTable
{
char * (OPENVR_FNTABLE_CALLTYPE *GetSettingsErrorNameFromEnum)(EVRSettingsError eError);
- bool (OPENVR_FNTABLE_CALLTYPE *Sync)(bool bForce, EVRSettingsError * peError);
void (OPENVR_FNTABLE_CALLTYPE *SetBool)(char * pchSection, char * pchSettingsKey, bool bValue, EVRSettingsError * peError);
void (OPENVR_FNTABLE_CALLTYPE *SetInt32)(char * pchSection, char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError);
void (OPENVR_FNTABLE_CALLTYPE *SetFloat)(char * pchSection, char * pchSettingsKey, float flValue, EVRSettingsError * peError);
diff --git a/headers/openvr_driver.h b/headers/openvr_driver.h
index f44e872..4d9fe6a 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 = 8;
- static const uint32_t k_nSteamVRVersionBuild = 19;
+ static const uint32_t k_nSteamVRVersionMinor = 9;
+ static const uint32_t k_nSteamVRVersionBuild = 16;
} // namespace vr
// vrtypes.h
@@ -207,6 +207,7 @@ enum ETrackedControllerRole
TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand
TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection
TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill
+ TrackedControllerRole_Stylus = 5, // Tracked device is a stylus
TrackedControllerRole_Max = 5
};
@@ -276,6 +277,7 @@ static const PropertyTypeTag_t k_unInt32PropertyTag = 2;
static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
static const PropertyTypeTag_t k_unStringPropertyTag = 5;
+static const PropertyTypeTag_t k_unErrorPropertyTag = 6;
static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
@@ -355,6 +357,10 @@ enum ETrackedDeviceProperty
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
Prop_Firmware_RemindUpdate_Bool = 1047,
+ Prop_PeripheralApplicationVersion_Uint64 = 1048,
+ Prop_ManufacturerSerialNumber_String = 1049,
+ Prop_ComputedSerialNumber_String = 1050,
+ Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
// Properties that are unique to TrackedDeviceClass_HMD
Prop_ReportsTimeSinceVSync_Bool = 2000,
@@ -432,13 +438,17 @@ enum ETrackedDeviceProperty
Prop_ExpectedControllerType_String = 2074,
Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
- Prop_HmdProvidesDisplaySettings_Bool = 2077,
-
+ Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
+ Prop_CameraSupportsCompatibilityModes_Bool = 2078,
Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver
Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user
Prop_DisplayColorMultLeft_Vector3 = 2082,
Prop_DisplayColorMultRight_Vector3 = 2083,
+ Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084,
+ Prop_DisplaySupportsAnalogGain_Bool = 2085,
+ Prop_DisplayMinAnalogGain_Float = 2086,
+ Prop_DisplayMaxAnalogGain_Float = 2087,
Prop_DashboardLayoutPathName_String = 2090,
Prop_DashboardScale_Float = 2091,
@@ -541,6 +551,8 @@ enum ETrackedPropertyError
TrackedProp_InvalidOperation = 11,
TrackedProp_CannotWriteToWildcards = 12,
TrackedProp_IPCReadFailure = 13,
+ TrackedProp_OutOfMemory = 14,
+ TrackedProp_InvalidContainer = 15,
};
/** Used to drive certain text in the UI when talking about the tracking system for the HMD */
@@ -796,6 +808,7 @@ enum EVREventType
VREvent_TrackersSectionSettingChanged = 866,
VREvent_LastKnownSectionSettingChanged = 867,
VREvent_DismissedWarningsSectionSettingChanged = 868,
+ VREvent_GpuSpeedSectionSettingChanged = 869,
VREvent_StatusUpdate = 900,
@@ -830,6 +843,7 @@ enum EVREventType
VREvent_Compositor_ApplicationResumed = 1416,
VREvent_Compositor_OutOfVideoMemory = 1417,
VREvent_Compositor_DisplayModeNotSupported = 1418, // k_pch_SteamVR_PreferredRefreshRate
+ VREvent_Compositor_StageOverrideReady = 1419,
VREvent_TrackedCamera_StartVideoStream = 1500,
VREvent_TrackedCamera_StopVideoStream = 1501,
@@ -852,6 +866,7 @@ enum EVREventType
VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate
VREvent_Input_TrackerActivated = 1706,
VREvent_Input_BindingsUpdated = 1707,
+ VREvent_Input_BindingSubscriptionChanged = 1708,
VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast
VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast
@@ -1143,6 +1158,7 @@ enum EShowUIType
ShowUI_Pairing = 3,
ShowUI_Settings = 4,
ShowUI_DebugCommands = 5,
+ ShowUI_FullControllerBinding = 6,
};
struct VREvent_ShowUI_t
@@ -1971,30 +1987,30 @@ enum ECameraVideoStreamFormat
enum ECameraCompatibilityMode
{
CAMERA_COMPAT_MODE_BULK_DEFAULT = 0,
- CAMERA_COMPAT_MODE_BULK_64K_DMA,
- CAMERA_COMPAT_MODE_BULK_16K_DMA,
- CAMERA_COMPAT_MODE_BULK_8K_DMA,
- CAMERA_COMPAT_MODE_ISO_52FPS,
- CAMERA_COMPAT_MODE_ISO_50FPS,
- CAMERA_COMPAT_MODE_ISO_48FPS,
- CAMERA_COMPAT_MODE_ISO_46FPS,
- CAMERA_COMPAT_MODE_ISO_44FPS,
- CAMERA_COMPAT_MODE_ISO_42FPS,
- CAMERA_COMPAT_MODE_ISO_40FPS,
- CAMERA_COMPAT_MODE_ISO_35FPS,
- CAMERA_COMPAT_MODE_ISO_30FPS,
- CAMERA_COMPAT_MODE_ISO_15FPS,
+ CAMERA_COMPAT_MODE_BULK_64K_DMA = 1,
+ CAMERA_COMPAT_MODE_BULK_16K_DMA = 2,
+ CAMERA_COMPAT_MODE_BULK_8K_DMA = 3,
+ CAMERA_COMPAT_MODE_ISO_52FPS = 4,
+ CAMERA_COMPAT_MODE_ISO_50FPS = 5,
+ CAMERA_COMPAT_MODE_ISO_48FPS = 6,
+ CAMERA_COMPAT_MODE_ISO_46FPS = 7,
+ CAMERA_COMPAT_MODE_ISO_44FPS = 8,
+ CAMERA_COMPAT_MODE_ISO_42FPS = 9,
+ CAMERA_COMPAT_MODE_ISO_40FPS = 10,
+ CAMERA_COMPAT_MODE_ISO_35FPS = 11,
+ CAMERA_COMPAT_MODE_ISO_30FPS = 12,
+ CAMERA_COMPAT_MODE_ISO_15FPS = 13,
MAX_CAMERA_COMPAT_MODES
};
enum ETrackedCameraRoomViewMode
{
TRACKED_CAMERA_ROOMVIEW_MODE_DEFAULT = 0,
- TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_A,
- TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_B,
- TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_TRANSLUSCENT,
- TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_OPAQUE,
- TRACKED_CAMERA_ROOMVIEW_MODE_COUNT,
+ TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_A = 1,
+ TRACKED_CAMERA_ROOMVIEW_MODE_EDGE_B = 2,
+ TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_TRANSLUSCENT = 3,
+ TRACKED_CAMERA_ROOMVIEW_MODE_VIDEO_OPAQUE = 4,
+ TRACKED_CAMERA_ROOMVIEW_MODE_COUNT = 5,
};
#ifdef _MSC_VER
@@ -2074,9 +2090,6 @@ namespace vr
public:
virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0;
- // Returns true if file sync occurred (force or settings dirty)
- virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
-
virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
@@ -2094,7 +2107,7 @@ namespace vr
};
//-----------------------------------------------------------------------------
- static const char * const IVRSettings_Version = "IVRSettings_002";
+ static const char * const IVRSettings_Version = "IVRSettings_003";
class CVRSettingHelper
{
@@ -2110,12 +2123,6 @@ namespace vr
return m_pSettings->GetSettingsErrorNameFromEnum( eError );
}
- // Returns true if file sync occurred (force or settings dirty)
- bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr )
- {
- return m_pSettings->Sync( bForce, peError );
- }
-
void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr )
{
m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError );
@@ -2218,6 +2225,7 @@ namespace vr
static const char * const k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye";
static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
+ static const char * const k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph";
static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
@@ -2232,7 +2240,6 @@ namespace vr
static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
- static const char * const k_pch_SteamVR_DebugInput = "debugInput";
static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
@@ -2382,6 +2389,9 @@ namespace vr
static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
static const char * const k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard";
static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings";
+ static const char * const k_pch_Dashboard_Position = "position";
+ static const char * const k_pch_Dashboard_DesktopScale = "desktopScale";
+ static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale";
//-----------------------------------------------------------------------------
// model skin keys
@@ -2411,6 +2421,7 @@ namespace vr
// per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type
static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
+ static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
//-----------------------------------------------------------------------------
@@ -2438,6 +2449,9 @@ namespace vr
static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation";
static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone";
+ //-----------------------------------------------------------------------------
+ // Log of GPU performance
+ static const char * const k_pch_GpuSpeed_Section = "GpuSpeed";
} // namespace vr
diff --git a/lib/linux32/libopenvr_api.so b/lib/linux32/libopenvr_api.so
index 94c2e6b..2c4a313 100755
--- a/lib/linux32/libopenvr_api.so
+++ b/lib/linux32/libopenvr_api.so
Binary files differ
diff --git a/lib/linux64/libopenvr_api.so b/lib/linux64/libopenvr_api.so
index e7f9c5d..378fff3 100755
--- a/lib/linux64/libopenvr_api.so
+++ b/lib/linux64/libopenvr_api.so
Binary files differ
diff --git a/samples/bin/linux32/libopenvr_api.so b/samples/bin/linux32/libopenvr_api.so
index 71ec8d3..fb7284c 100644
--- a/samples/bin/linux32/libopenvr_api.so
+++ b/samples/bin/linux32/libopenvr_api.so
Binary files differ
diff --git a/samples/bin/linux64/libopenvr_api.so b/samples/bin/linux64/libopenvr_api.so
index 8644b3f..1e035ae 100644
--- a/samples/bin/linux64/libopenvr_api.so
+++ b/samples/bin/linux64/libopenvr_api.so
Binary files differ
diff --git a/samples/bin/win32/openvr_api.dll b/samples/bin/win32/openvr_api.dll
index 94e3bd9..f5c6e9b 100644
--- a/samples/bin/win32/openvr_api.dll
+++ b/samples/bin/win32/openvr_api.dll
Binary files differ
diff --git a/samples/bin/win64/openvr_api.dll b/samples/bin/win64/openvr_api.dll
index b70ee19..bd76c2a 100644
--- a/samples/bin/win64/openvr_api.dll
+++ b/samples/bin/win64/openvr_api.dll
Binary files differ
diff --git a/src/vrcommon/pathtools_public.cpp b/src/vrcommon/pathtools_public.cpp
index 26bc1be..80eadb8 100644
--- a/src/vrcommon/pathtools_public.cpp
+++ b/src/vrcommon/pathtools_public.cpp
@@ -819,7 +819,7 @@ std::string Path_FilePathToUrl( const std::string & sRelativePath, const std::st
size_t unBufferSize = sAbsolute.length() * 3;
char *pchBuffer = (char *)alloca( unBufferSize );
- V_URLEncodeNoPlusForSpace( pchBuffer, (int)unBufferSize, sAbsolute.c_str(), (int)sAbsolute.length() );
+ V_URLEncodeFullPath( pchBuffer, (int)unBufferSize, sAbsolute.c_str(), (int)sAbsolute.length() );
return std::string( FILE_URL_PREFIX ) + pchBuffer;
}
diff --git a/src/vrcommon/strtools_public.cpp b/src/vrcommon/strtools_public.cpp
index 61cf324..661325a 100644
--- a/src/vrcommon/strtools_public.cpp
+++ b/src/vrcommon/strtools_public.cpp
@@ -4,7 +4,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
+#include <codecvt>
#include <iostream>
+#include <functional>
+#include <locale>
+#include <codecvt>
//-----------------------------------------------------------------------------
// Purpose:
@@ -49,96 +53,36 @@ bool StringHasSuffixCaseSensitive( const std::string &sString, const std::string
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
+
std::string UTF16to8(const wchar_t * in)
{
- std::string out;
- unsigned int codepoint = 0;
- for ( ; in && *in != 0; ++in )
+ try
{
- if (*in >= 0xd800 && *in <= 0xdbff)
- codepoint = ((*in - 0xd800) << 10) + 0x10000;
- else
- {
- if (*in >= 0xdc00 && *in <= 0xdfff)
- codepoint |= *in - 0xdc00;
- else
- codepoint = *in;
+ typedef std::codecvt_utf8< wchar_t > convert_type;
+ std::wstring_convert< convert_type, wchar_t > converter;
- if (codepoint <= 0x7f)
- out.append(1, static_cast<char>(codepoint));
- else if (codepoint <= 0x7ff)
- {
- out.append(1, static_cast<char>(0xc0 | ((codepoint >> 6) & 0x1f)));
- out.append(1, static_cast<char>(0x80 | (codepoint & 0x3f)));
- }
- else if (codepoint <= 0xffff)
- {
- out.append(1, static_cast<char>(0xe0 | ((codepoint >> 12) & 0x0f)));
- out.append(1, static_cast<char>(0x80 | ((codepoint >> 6) & 0x3f)));
- out.append(1, static_cast<char>(0x80 | (codepoint & 0x3f)));
- }
- else
- {
- out.append(1, static_cast<char>(0xf0 | ((codepoint >> 18) & 0x07)));
- out.append(1, static_cast<char>(0x80 | ((codepoint >> 12) & 0x3f)));
- out.append(1, static_cast<char>(0x80 | ((codepoint >> 6) & 0x3f)));
- out.append(1, static_cast<char>(0x80 | (codepoint & 0x3f)));
- }
- codepoint = 0;
- }
+ return converter.to_bytes( in );
+ }
+ catch ( ... )
+ {
+ return std::string();
}
- return out;
}
+
std::wstring UTF8to16(const char * in)
{
- std::wstring out;
- unsigned int codepoint = 0;
- int following = 0;
- for ( ; in && *in != 0; ++in )
+ try
{
- unsigned char ch = *in;
- if (ch <= 0x7f)
- {
- codepoint = ch;
- following = 0;
- }
- else if (ch <= 0xbf)
- {
- if (following > 0)
- {
- codepoint = (codepoint << 6) | (ch & 0x3f);
- --following;
- }
- }
- else if (ch <= 0xdf)
- {
- codepoint = ch & 0x1f;
- following = 1;
- }
- else if (ch <= 0xef)
- {
- codepoint = ch & 0x0f;
- following = 2;
- }
- else
- {
- codepoint = ch & 0x07;
- following = 3;
- }
- if (following == 0)
- {
- if (codepoint > 0xffff)
- {
- out.append(1, static_cast<wchar_t>(0xd800 + (codepoint >> 10)));
- out.append(1, static_cast<wchar_t>(0xdc00 + (codepoint & 0x03ff)));
- }
- else
- out.append(1, static_cast<wchar_t>(codepoint));
- codepoint = 0;
- }
+ typedef std::codecvt_utf8< wchar_t > convert_type;
+ std::wstring_convert< convert_type, wchar_t > converter;
+
+ return converter.from_bytes( in );
+ }
+ catch ( ... )
+ {
+ return std::wstring();
}
- return out;
}
@@ -245,11 +189,30 @@ int iHexCharToInt( char cValue )
return -1;
}
+
+//-----------------------------------------------------------------------------
+// Purpose: These define the set of characters to filter for components (which
+// need all the escaping we can muster) vs. paths (which don't want
+// / and : escaped so we don't break less compliant URL handling code.
+//-----------------------------------------------------------------------------
+static bool CharNeedsEscape_Component( const char c )
+{
+ return (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9')
+ && c != '-' && c != '_' && c != '.');
+}
+static bool CharNeedsEscape_FullPath( const char c )
+{
+ return (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9')
+ && c != '-' && c != '_' && c != '.' && c != '/' && c != ':' );
+}
+
+
//-----------------------------------------------------------------------------
// Purpose: Internal implementation of encode, works in the strict RFC manner, or
// with spaces turned to + like HTML form encoding.
//-----------------------------------------------------------------------------
-void V_URLEncodeInternal( char *pchDest, int nDestLen, const char *pchSource, int nSourceLen, bool bUsePlusForSpace )
+void V_URLEncodeInternal( char *pchDest, int nDestLen, const char *pchSource, int nSourceLen,
+ bool bUsePlusForSpace, std::function< bool(const char)> fnNeedsEscape )
{
//AssertMsg( nDestLen > 3*nSourceLen, "Target buffer for V_URLEncode should be 3x source length, plus one for terminating null\n" );
@@ -267,9 +230,7 @@ void V_URLEncodeInternal( char *pchDest, int nDestLen, const char *pchSource, in
// We allow only a-z, A-Z, 0-9, period, underscore, and hyphen to pass through unescaped.
// These are the characters allowed by both the original RFC 1738 and the latest RFC 3986.
// Current specs also allow '~', but that is forbidden under original RFC 1738.
- if ( !( pchSource[i] >= 'a' && pchSource[i] <= 'z' ) && !( pchSource[i] >= 'A' && pchSource[i] <= 'Z' ) && !(pchSource[i] >= '0' && pchSource[i] <= '9' )
- && pchSource[i] != '-' && pchSource[i] != '_' && pchSource[i] != '.'
- )
+ if ( fnNeedsEscape( pchSource[i] ) )
{
if ( bUsePlusForSpace && pchSource[i] == ' ' )
{
@@ -397,15 +358,19 @@ size_t V_URLDecodeInternal( char *pchDecodeDest, int nDecodeDestLen, const char
//-----------------------------------------------------------------------------
void V_URLEncode( char *pchDest, int nDestLen, const char *pchSource, int nSourceLen )
{
- return V_URLEncodeInternal( pchDest, nDestLen, pchSource, nSourceLen, true );
+ return V_URLEncodeInternal( pchDest, nDestLen, pchSource, nSourceLen, true, CharNeedsEscape_Component );
}
void V_URLEncodeNoPlusForSpace( char *pchDest, int nDestLen, const char *pchSource, int nSourceLen )
{
- return V_URLEncodeInternal( pchDest, nDestLen, pchSource, nSourceLen, false );
+ return V_URLEncodeInternal( pchDest, nDestLen, pchSource, nSourceLen, false, CharNeedsEscape_Component );
}
+void V_URLEncodeFullPath( char *pchDest, int nDestLen, const char *pchSource, int nSourceLen )
+{
+ return V_URLEncodeInternal( pchDest, nDestLen, pchSource, nSourceLen, false, CharNeedsEscape_FullPath );
+}
//-----------------------------------------------------------------------------
// Purpose: Decodes a string (or binary data) from URL encoding format, see rfc1738 section 2.2.
@@ -458,3 +423,62 @@ std::vector<std::string> TokenizeString( const std::string & sString, char cToke
return vecStrings;
}
+//-----------------------------------------------------------------------------
+// Purpose: Repairs a should-be-UTF-8 string to a for-sure-is-UTF-8 string, plus return boolean if we subbed in '?' somewhere
+//-----------------------------------------------------------------------------
+bool RepairUTF8( const char *pbegin, const char *pend, std::string & sOutputUtf8 )
+{
+ typedef std::codecvt_utf8<char32_t> facet_type;
+ facet_type myfacet;
+
+ std::mbstate_t mystate = std::mbstate_t();
+
+ sOutputUtf8.clear();
+ sOutputUtf8.reserve( pend - pbegin );
+ bool bSqueakyClean = true;
+
+ const char *pmid = pbegin;
+
+ while ( pmid != pend )
+ {
+ char32_t out = 0xdeadbeef, *pout;
+ pbegin = pmid;
+ switch ( myfacet.in( mystate, pbegin, pend, pmid, &out, &out + 1, pout ) )
+ {
+ case facet_type::ok:
+ // could convert back, but no need
+ for ( const char *p = pbegin; p != pmid; ++p )
+ {
+ sOutputUtf8 += *p;
+ }
+ break;
+
+ case facet_type::noconv:
+ // unexpected! always converting type
+ bSqueakyClean = false;
+ break;
+
+ case facet_type::partial:
+ sOutputUtf8 += '?';
+ pmid++; // partial consumes 0, so make progress
+ bSqueakyClean = false;
+ break;
+
+ case facet_type::error:
+ sOutputUtf8 += '?';
+ // error consumes some bytes
+ bSqueakyClean = false;
+ break;
+ }
+ }
+
+ return bSqueakyClean;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Repairs a should-be-UTF-8 string to a for-sure-is-UTF-8 string, plus return boolean if we subbed in '?' somewhere
+//-----------------------------------------------------------------------------
+bool RepairUTF8( const std::string & sInputUtf8, std::string & sOutputUtf8 )
+{
+ return RepairUTF8( sInputUtf8.data(), sInputUtf8.data() + sInputUtf8.size(), sOutputUtf8 );
+}
diff --git a/src/vrcommon/strtools_public.h b/src/vrcommon/strtools_public.h
index 10c9d99..9a53907 100644
--- a/src/vrcommon/strtools_public.h
+++ b/src/vrcommon/strtools_public.h
@@ -21,6 +21,10 @@ std::string UTF16to8(const wchar_t * in);
std::wstring UTF8to16(const char * in);
#define Utf16FromUtf8 UTF8to16
+/** Repairs a should-be-UTF-8 string to a for-sure-is-UTF-8 string, plus return boolean if we subbed in '?' somewhere */
+bool RepairUTF8( const char *begin, const char *end, std::string & sOutputUtf8 );
+bool RepairUTF8( const std::string & sInputUtf8, std::string & sOutputUtf8 );
+
/** safely copy a string into a buffer */
void strcpy_safe( char *pchBuffer, size_t unBufferSizeBytes, const char *pchSource );
template< size_t bufferSize >
@@ -115,6 +119,10 @@ void V_URLEncode( char *pchDest, int nDestLen, const char *pchSource, int nSourc
/** Same as V_URLEncode, but without plus for space. */
void V_URLEncodeNoPlusForSpace( char *pchDest, int nDestLen, const char *pchSource, int nSourceLen );
+/** Same as V_URLEncodeNoPlusForSpace, but without escaping / and : */
+void V_URLEncodeFullPath( char *pchDest, int nDestLen, const char *pchSource, int nSourceLen );
+
+
//-----------------------------------------------------------------------------
// Purpose: Decodes a string (or binary data) from URL encoding format, see rfc1738 section 2.2.
// This version of the call isn't a strict RFC implementation, but uses + for space as is
diff --git a/src/vrcommon/vrpathregistry_public.cpp b/src/vrcommon/vrpathregistry_public.cpp
index b68c076..e4be52f 100644
--- a/src/vrcommon/vrpathregistry_public.cpp
+++ b/src/vrcommon/vrpathregistry_public.cpp
@@ -229,12 +229,14 @@ bool CVRPathRegistry_Public::BLoadFromFile()
}
Json::Value root;
- Json::Reader reader;
+ Json::CharReaderBuilder builder;
+ std::istringstream istream( sRegistryContents );
+ std::string sErrors;
try {
- if ( !reader.parse( sRegistryContents, root ) )
+ if ( !parseFromStream( builder, istream, &root, &sErrors ) )
{
- VRLog( "Unable to parse %s: %s\n", sRegPath.c_str(), reader.getFormattedErrorMessages().c_str() );
+ VRLog( "Unable to parse %s: %s\n", sRegPath.c_str(), sErrors.c_str() );
return false;
}
@@ -278,8 +280,8 @@ bool CVRPathRegistry_Public::BSaveToFile() const
StringListToJson( m_vecLogPath, root, "log" );
StringListToJson( m_vecExternalDrivers, root, "external_drivers" );
- Json::StyledWriter writer;
- std::string sRegistryContents = writer.write( root );
+ Json::StreamWriterBuilder builder;
+ std::string sRegistryContents = Json::writeString( builder, root );
// make sure the directory we're writing into actually exists
std::string sRegDirectory = Path_StripFilename( sRegPath );