@@ -277,6 +277,7 @@ enum ETrackedDeviceProperty
277
277
Prop_Axis2Type_Int32 = 3004 , // Return value is of type EVRControllerAxisType
278
278
Prop_Axis3Type_Int32 = 3005 , // Return value is of type EVRControllerAxisType
279
279
Prop_Axis4Type_Int32 = 3006 , // Return value is of type EVRControllerAxisType
280
+ Prop_ControllerRoleHint_Int32 = 3007 , // Return value is of type ETrackedControllerRole
280
281
281
282
// Properties that are unique to TrackedDeviceClass_TrackingReference
282
283
Prop_FieldOfViewLeftDegrees_Float = 4000 ,
@@ -346,6 +347,7 @@ enum EVRState
346
347
VRState_Ready_Alert = 4 ,
347
348
VRState_NotReady = 5 ,
348
349
VRState_Standby = 6 ,
350
+ VRState_Ready_Alert_Low = 7 ,
349
351
};
350
352
351
353
/* * The types of events that could be posted (and what the parameters mean for each event type) */
@@ -362,6 +364,7 @@ enum EVREventType
362
364
VREvent_EnterStandbyMode = 106 ,
363
365
VREvent_LeaveStandbyMode = 107 ,
364
366
VREvent_TrackedDeviceRoleChanged = 108 ,
367
+ VREvent_WatchdogWakeUpRequested = 109 ,
365
368
366
369
VREvent_ButtonPress = 200 , // data is controller
367
370
VREvent_ButtonUnpress = 201 , // data is controller
@@ -375,6 +378,7 @@ enum EVREventType
375
378
VREvent_FocusLeave = 304 , // data is overlay
376
379
VREvent_Scroll = 305 , // data is mouse
377
380
VREvent_TouchPadMove = 306 , // data is mouse
381
+ VREvent_OverlayFocusChanged = 307 , // data is overlay, global event
378
382
379
383
VREvent_InputFocusCaptured = 400 , // data is process DEPRECATED
380
384
VREvent_InputFocusReleased = 401 , // data is process DEPRECATED
@@ -412,6 +416,7 @@ enum EVREventType
412
416
VREvent_ScreenshotTaken = 521 , // Sent by compositor to the application that the screenshot has been taken
413
417
VREvent_ScreenshotFailed = 522 , // Sent by compositor to the application that the screenshot failed to be taken
414
418
VREvent_SubmitScreenshotToDashboard = 523 , // Sent by compositor to the dashboard that a completed screenshot was submitted
419
+ VREvent_ScreenshotProgressToDashboard = 524 , // Sent by compositor to the dashboard that a completed screenshot was submitted
415
420
416
421
VREvent_Notification_Shown = 600 ,
417
422
VREvent_Notification_Hidden = 601 ,
@@ -453,6 +458,7 @@ enum EVREventType
453
458
VREvent_ApplicationTransitionAborted = 1301 ,
454
459
VREvent_ApplicationTransitionNewAppStarted = 1302 ,
455
460
VREvent_ApplicationListUpdated = 1303 ,
461
+ VREvent_ApplicationMimeTypeLoad = 1304 ,
456
462
457
463
VREvent_Compositor_MirrorWindowShown = 1400 ,
458
464
VREvent_Compositor_MirrorWindowHidden = 1401 ,
@@ -634,6 +640,17 @@ struct VREvent_Screenshot_t
634
640
uint32_t type;
635
641
};
636
642
643
+ struct VREvent_ScreenshotProgress_t
644
+ {
645
+ float progress;
646
+ };
647
+
648
+ struct VREvent_ApplicationLaunch_t
649
+ {
650
+ uint32_t pid;
651
+ uint32_t unArgsHandle;
652
+ };
653
+
637
654
/* * If you change this you must manually update openvr_interop.cs.py */
638
655
typedef union
639
656
{
@@ -652,6 +669,8 @@ typedef union
652
669
VREvent_TouchPadMove_t touchPadMove;
653
670
VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
654
671
VREvent_Screenshot_t screenshot;
672
+ VREvent_ScreenshotProgress_t screenshotProgress;
673
+ VREvent_ApplicationLaunch_t applicationLaunch;
655
674
} VREvent_Data_t;
656
675
657
676
/* * An event posted by the server to all running applications */
@@ -795,6 +814,9 @@ enum EVRApplicationType
795
814
VRApplication_Utility = 4 , // Init should not try to load any drivers. The application needs access to utility
796
815
// interfaces (like IVRSettings and IVRApplications) but not hardware.
797
816
VRApplication_VRMonitor = 5 , // Reserved for vrmonitor
817
+ VRApplication_SteamWatchdog = 6 ,// Reserved for Steam
818
+
819
+ VRApplication_Max
798
820
};
799
821
800
822
@@ -851,6 +873,14 @@ enum EVRInitError
851
873
VRInitError_Init_NotSupportedWithCompositor = 122 ,
852
874
VRInitError_Init_NotAvailableToUtilityApps = 123 ,
853
875
VRInitError_Init_Internal = 124 ,
876
+ VRInitError_Init_HmdDriverIdIsNone = 125 ,
877
+ VRInitError_Init_HmdNotFoundPresenceFailed = 126 ,
878
+ VRInitError_Init_VRMonitorNotFound = 127 ,
879
+ VRInitError_Init_VRMonitorStartupFailed = 128 ,
880
+ VRInitError_Init_LowPowerWatchdogNotSupported = 129 ,
881
+ VRInitError_Init_InvalidApplicationType = 130 ,
882
+ VRInitError_Init_NotAvailableToWatchdogApps = 131 ,
883
+ VRInitError_Init_WatchdogDisabledInSettings = 132 ,
854
884
855
885
VRInitError_Driver_Failed = 200 ,
856
886
VRInitError_Driver_Unknown = 201 ,
@@ -861,13 +891,20 @@ enum EVRInitError
861
891
VRInitError_Driver_NotCalibrated = 206 ,
862
892
VRInitError_Driver_CalibrationInvalid = 207 ,
863
893
VRInitError_Driver_HmdDisplayNotFound = 208 ,
864
-
894
+ VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209 ,
895
+ // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons
896
+ VRInitError_Driver_HmdDriverIdOutOfBounds = 211 ,
897
+ VRInitError_Driver_HmdDisplayMirrored = 212 ,
898
+
865
899
VRInitError_IPC_ServerInitFailed = 300 ,
866
900
VRInitError_IPC_ConnectFailed = 301 ,
867
901
VRInitError_IPC_SharedStateInitFailed = 302 ,
868
902
VRInitError_IPC_CompositorInitFailed = 303 ,
869
903
VRInitError_IPC_MutexInitFailed = 304 ,
870
904
VRInitError_IPC_Failed = 305 ,
905
+ VRInitError_IPC_CompositorConnectFailed = 306 ,
906
+ VRInitError_IPC_CompositorInvalidConnectResponse = 307 ,
907
+ VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308 ,
871
908
872
909
VRInitError_Compositor_Failed = 400 ,
873
910
VRInitError_Compositor_D3D11HardwareRequired = 401 ,
@@ -971,7 +1008,7 @@ static const uint32_t k_unScreenshotHandleInvalid = 0;
971
1008
#define VR_INTERFACE extern " C" __declspec( dllimport )
972
1009
#endif
973
1010
974
- #elif defined(GNUC ) || defined(COMPILER_GCC) || defined(__APPLE__)
1011
+ #elif defined(__GNUC__ ) || defined(COMPILER_GCC) || defined(__APPLE__)
975
1012
976
1013
#ifdef VR_API_EXPORT
977
1014
#define VR_INTERFACE extern " C" __attribute__((visibility(" default" )))
@@ -995,6 +1032,25 @@ static const uint32_t k_unScreenshotHandleInvalid = 0;
995
1032
#endif // _INCLUDE_VRTYPES_H
996
1033
997
1034
1035
+ // vrannotation.h
1036
+ #ifdef API_GEN
1037
+ # define VR_CLANG_ATTR (ATTR ) __attribute__((annotate( ATTR )))
1038
+ #else
1039
+ # define VR_CLANG_ATTR (ATTR )
1040
+ #endif
1041
+
1042
+ #define VR_METHOD_DESC (DESC ) VR_CLANG_ATTR( " desc:" #DESC " ;" )
1043
+ #define VR_IGNOREATTR () VR_CLANG_ATTR( " ignore" )
1044
+ #define VR_OUT_STRUCT () VR_CLANG_ATTR( " out_struct: ;" )
1045
+ #define VR_OUT_STRING () VR_CLANG_ATTR( " out_string: ;" )
1046
+ #define VR_OUT_ARRAY_CALL (COUNTER,FUNCTION,PARAMS ) VR_CLANG_ATTR( " out_array_call:" #COUNTER " ," #FUNCTION " ," #PARAMS " ;" )
1047
+ #define VR_OUT_ARRAY_COUNT (COUNTER ) VR_CLANG_ATTR( " out_array_count:" #COUNTER " ;" )
1048
+ #define VR_ARRAY_COUNT (COUNTER ) VR_CLANG_ATTR( " array_count:" #COUNTER " ;" )
1049
+ #define VR_ARRAY_COUNT_D (COUNTER, DESC ) VR_CLANG_ATTR( " array_count:" #COUNTER " ;desc:" #DESC )
1050
+ #define VR_BUFFER_COUNT (COUNTER ) VR_CLANG_ATTR( " buffer_count:" #COUNTER " ;" )
1051
+ #define VR_OUT_BUFFER_COUNT (COUNTER ) VR_CLANG_ATTR( " out_buffer_count:" #COUNTER " ;" )
1052
+ #define VR_OUT_STRING_COUNT (COUNTER ) VR_CLANG_ATTR( " out_string_count:" #COUNTER " ;" )
1053
+
998
1054
// vrtrackedcameratypes.h
999
1055
#ifndef _VRTRACKEDCAMERATYPES_H
1000
1056
#define _VRTRACKEDCAMERATYPES_H
@@ -1121,7 +1177,7 @@ namespace vr
1121
1177
virtual void SetInt32 ( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
1122
1178
virtual float GetFloat ( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
1123
1179
virtual void SetFloat ( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
1124
- virtual void GetString ( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
1180
+ virtual void GetString ( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
1125
1181
virtual void SetString ( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0;
1126
1182
1127
1183
virtual void RemoveSection ( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0;
@@ -1170,6 +1226,10 @@ namespace vr
1170
1226
static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = " forceFadeOnBadTracking" ;
1171
1227
static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = " defaultMirrorView" ;
1172
1228
static const char * const k_pch_SteamVR_ShowMirrorView_Bool = " showMirrorView" ;
1229
+ static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = " startMonitorFromAppLaunch" ;
1230
+ static const char * const k_pch_SteamVR_AutoLaunchSteamVROnButtonPress = " autoLaunchSteamVROnButtonPress" ;
1231
+ static const char * const k_pch_SteamVR_UseGenericGraphcisDevice_Bool = " useGenericGraphicsDevice" ;
1232
+
1173
1233
1174
1234
// -----------------------------------------------------------------------------
1175
1235
// lighthouse keys
@@ -1205,7 +1265,8 @@ namespace vr
1205
1265
// user interface keys
1206
1266
static const char * const k_pch_UserInterface_Section = " userinterface" ;
1207
1267
static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = " StatusAlwaysOnTop" ;
1208
- static const char * const k_pch_UserInterface_EnableScreenshots_Bool = " EnableScreenshots" ;
1268
+ static const char * const k_pch_UserInterface_Screenshots_Bool = " screenshots" ;
1269
+ static const char * const k_pch_UserInterface_ScreenshotType_Int = " screenshotType" ;
1209
1270
1210
1271
// -----------------------------------------------------------------------------
1211
1272
// notification keys
@@ -1543,7 +1604,6 @@ namespace vr
1543
1604
// ivrcameracomponent.h
1544
1605
namespace vr
1545
1606
{
1546
-
1547
1607
// -----------------------------------------------------------------------------
1548
1608
// -----------------------------------------------------------------------------
1549
1609
class ICameraVideoSinkCallback
@@ -1561,28 +1621,21 @@ namespace vr
1561
1621
// ------------------------------------
1562
1622
// Camera Methods
1563
1623
// ------------------------------------
1564
- virtual bool HasCamera () = 0;
1565
- virtual bool GetCameraFirmwareDescription ( char *pBuffer, uint32_t nBufferLen ) = 0;
1566
1624
virtual bool GetCameraFrameDimensions ( vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0;
1567
1625
virtual bool GetCameraFrameBufferingRequirements ( int *pDefaultFrameQueueSize, uint32_t *pFrameBufferDataSize ) = 0;
1568
1626
virtual bool SetCameraFrameBuffering ( int nFrameBufferCount, void **ppFrameBuffers, uint32_t nFrameBufferDataSize ) = 0;
1569
1627
virtual bool SetCameraVideoStreamFormat ( vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0;
1570
1628
virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat () = 0;
1571
1629
virtual bool StartVideoStream () = 0;
1572
1630
virtual void StopVideoStream () = 0;
1573
- virtual bool IsVideoStreamActive () = 0;
1574
- virtual float GetVideoStreamElapsedTime () = 0;
1631
+ virtual bool IsVideoStreamActive ( bool *pbPaused, float *pflElapsedTime ) = 0;
1575
1632
virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame () = 0;
1576
1633
virtual void ReleaseVideoStreamFrame ( const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0;
1577
1634
virtual bool SetAutoExposure ( bool bEnable ) = 0;
1578
1635
virtual bool PauseVideoStream () = 0;
1579
1636
virtual bool ResumeVideoStream () = 0;
1580
- virtual bool IsVideoStreamPaused () = 0;
1581
1637
virtual bool GetCameraDistortion ( float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0;
1582
- virtual bool GetCameraProjection ( float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
1583
- virtual bool GetRecommendedCameraUndistortion ( uint32_t *pUndistortionWidthPixels, uint32_t *pUndistortionHeightPixels ) = 0;
1584
- virtual bool SetCameraUndistortion ( uint32_t nUndistortionWidthPixels, uint32_t nUndistortionHeightPixels ) = 0;
1585
- virtual bool GetCameraFirmwareVersion ( uint64_t *pFirmwareVersion ) = 0;
1638
+ virtual bool GetCameraProjection ( vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
1586
1639
virtual bool SetFrameRate ( int nISPFrameRate, int nSensorFrameRate ) = 0;
1587
1640
virtual bool SetCameraVideoSinkCallback ( vr::ICameraVideoSinkCallback *pCameraVideoSinkCallback ) = 0;
1588
1641
virtual bool GetCameraCompatibilityMode ( vr::ECameraCompatibilityMode *pCameraCompatibilityMode ) = 0;
@@ -1591,7 +1644,7 @@ namespace vr
1591
1644
virtual bool GetCameraIntrinsics ( vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter ) = 0;
1592
1645
};
1593
1646
1594
- static const char *IVRCameraComponent_Version = " IVRCameraComponent_001 " ;
1647
+ static const char *IVRCameraComponent_Version = " IVRCameraComponent_002 " ;
1595
1648
}
1596
1649
// itrackeddevicedriverprovider.h
1597
1650
namespace vr
@@ -1754,9 +1807,20 @@ class IClientDriverHost
1754
1807
1755
1808
/* * always returns a pointer to a valid interface pointer of IVRSettings */
1756
1809
virtual IVRSettings *GetSettings ( const char *pchInterfaceVersion ) = 0;
1810
+
1811
+ /* * Client drivers in watchdog mode should call this when they have received a signal from hardware that should
1812
+ * cause SteamVR to start */
1813
+ virtual void WatchdogWakeUp () = 0;
1757
1814
};
1758
1815
1759
1816
1817
+ /* * Defines the mode that the client driver should start in. */
1818
+ enum EClientDriverMode
1819
+ {
1820
+ ClientDriverMode_Normal = 0 ,
1821
+ ClientDriverMode_Watchdog = 1 , // client should return VRInitError_Init_LowPowerWatchdogNotSupported if it can't support this mode
1822
+ };
1823
+
1760
1824
1761
1825
/* * This interface must be implemented in each driver. It will be loaded in vrclient.dll */
1762
1826
class IClientTrackedDeviceProvider
@@ -1772,7 +1836,7 @@ class IClientTrackedDeviceProvider
1772
1836
* config files.
1773
1837
* pchDriverInstallDir - The absolute path of the root directory for the driver.
1774
1838
*/
1775
- virtual EVRInitError Init ( IDriverLog *pDriverLog, vr::IClientDriverHost *pDriverHost, const char *pchUserDriverConfigDir, const char *pchDriverInstallDir ) = 0;
1839
+ virtual EVRInitError Init ( EClientDriverMode eDriverMode, IDriverLog *pDriverLog, vr::IClientDriverHost *pDriverHost, const char *pchUserDriverConfigDir, const char *pchDriverInstallDir ) = 0;
1776
1840
1777
1841
/* * cleans up the driver right before it is unloaded */
1778
1842
virtual void Cleanup () = 0;
@@ -1800,7 +1864,7 @@ class IClientTrackedDeviceProvider
1800
1864
virtual uint32_t GetMCImage ( uint32_t *pImgWidth, uint32_t *pImgHeight, uint32_t *pChannels, void *pDataBuffer, uint32_t unBufferLen ) = 0;
1801
1865
};
1802
1866
1803
- static const char *IClientTrackedDeviceProvider_Version = " IClientTrackedDeviceProvider_003 " ;
1867
+ static const char *IClientTrackedDeviceProvider_Version = " IClientTrackedDeviceProvider_004 " ;
1804
1868
1805
1869
}
1806
1870
0 commit comments