Skip to content

Commit

Permalink
OpenVR SDK 1.0.9
Browse files Browse the repository at this point in the history
Drivers:
- Added TrackedDeviceDisplayTransformUpdated, which allows HMD drivers to explicitly specify the 4x3 eye-to-head transforms. The classic mechanism of setting Prop_UserIpdMeters_Float is still supported.
- Added Prop_DriverProvidedChaperonePath_String, which a driver can set on the HMD device to specify a fallback chaperone setup that will be used if no other chaperone data is available for the universe returned by that driver. This string is a JSON object in the same format as the .vrchap file.
- Added VREvent_WirelessDisconnect and VREvent_WirelessReconnect events for display redirect drivers to notify the runtime of display connection status.

[git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4059277]
  • Loading branch information
jeremyselan committed Jul 18, 2017
1 parent bcac1bf commit 5d0574b
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 15 deletions.
Binary file modified bin/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux32/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified bin/linux64/libopenvr_api.so.dbg
Binary file not shown.
Binary file modified bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file not shown.
Binary file modified bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified bin/win32/openvr_api.pdb
Binary file not shown.
Binary file modified bin/win64/openvr_api.dll
Binary file not shown.
Binary file modified bin/win64/openvr_api.pdb
Binary file not shown.
6 changes: 6 additions & 0 deletions headers/openvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ enum ETrackedDeviceProperty
Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
Prop_DisplayDebugMode_Bool = 2044,
Prop_GraphicsAdapterLuid_Uint64 = 2045,
Prop_DriverProvidedChaperonePath_String = 2048,

// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
Expand Down Expand Up @@ -464,6 +465,8 @@ enum EVREventType
VREvent_WatchdogWakeUpRequested = 109,
VREvent_LensDistortionChanged = 110,
VREvent_PropertyChanged = 111,
VREvent_WirelessDisconnect = 112,
VREvent_WirelessReconnect = 113,

VREvent_ButtonPress = 200, // data is controller
VREvent_ButtonUnpress = 201, // data is controller
Expand Down Expand Up @@ -1537,6 +1540,7 @@ namespace vr
VRApplicationError_OldApplicationQuitting = 112,
VRApplicationError_TransitionAborted = 113,
VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication)
VRApplicationError_SteamVRIsExiting = 115,

VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data
VRApplicationError_PropertyNotSet = 201, // The requested property was not set
Expand Down Expand Up @@ -1567,6 +1571,7 @@ namespace vr
VRApplicationProperty_IsTemplate_Bool = 61,
VRApplicationProperty_IsInstanced_Bool = 62,
VRApplicationProperty_IsInternal_Bool = 63,
VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64,

VRApplicationProperty_LastLaunchTime_Uint64 = 70,
};
Expand Down Expand Up @@ -1916,6 +1921,7 @@ namespace vr
static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";

//-----------------------------------------------------------------------------
// dashboard keys
Expand Down
16 changes: 16 additions & 0 deletions headers/openvr_api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,7 @@ struct PollNextEventUnion
}
public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
Expand All @@ -1679,6 +1680,7 @@ public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
event_packed.Unpack(ref pEvent);
return packed_result;
}
#endif
bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent);
return result;
}
Expand Down Expand Up @@ -1711,6 +1713,7 @@ struct GetControllerStateUnion
}
public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
Expand All @@ -1723,6 +1726,7 @@ public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerStat
state_packed.Unpack(ref pControllerState);
return packed_result;
}
#endif
bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
return result;
}
Expand All @@ -1740,6 +1744,7 @@ struct GetControllerStateWithPoseUnion
}
public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
Expand All @@ -1752,6 +1757,7 @@ public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unCo
state_packed.Unpack(ref pControllerState);
return packed_result;
}
#endif
bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
return result;
}
Expand Down Expand Up @@ -2705,6 +2711,7 @@ struct PollNextOverlayEventUnion
}
public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
Expand All @@ -2717,6 +2724,7 @@ public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint
event_packed.Unpack(ref pEvent);
return packed_result;
}
#endif
bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref pEvent,uncbVREvent);
return result;
}
Expand Down Expand Up @@ -2981,6 +2989,7 @@ struct GetComponentStateUnion
}
public bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
Expand All @@ -2993,6 +3002,7 @@ public bool GetComponentState(string pchRenderModelName,string pchComponentName,
state_packed.Unpack(ref pControllerState);
return packed_result;
}
#endif
bool result = FnTable.GetComponentState(pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState);
return result;
}
Expand Down Expand Up @@ -3344,6 +3354,7 @@ public enum ETrackedDeviceProperty
Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
Prop_DisplayDebugMode_Bool = 2044,
Prop_GraphicsAdapterLuid_Uint64 = 2045,
Prop_DriverProvidedChaperonePath_String = 2048,
Prop_AttachedDeviceId_String = 3000,
Prop_SupportedButtons_Uint64 = 3001,
Prop_Axis0Type_Int32 = 3002,
Expand Down Expand Up @@ -3429,6 +3440,8 @@ public enum EVREventType
VREvent_WatchdogWakeUpRequested = 109,
VREvent_LensDistortionChanged = 110,
VREvent_PropertyChanged = 111,
VREvent_WirelessDisconnect = 112,
VREvent_WirelessReconnect = 113,
VREvent_ButtonPress = 200,
VREvent_ButtonUnpress = 201,
VREvent_ButtonTouch = 202,
Expand Down Expand Up @@ -3785,6 +3798,7 @@ public enum EVRApplicationError
OldApplicationQuitting = 112,
TransitionAborted = 113,
IsTemplate = 114,
SteamVRIsExiting = 115,
BufferTooSmall = 200,
PropertyNotSet = 201,
UnknownProperty = 202,
Expand All @@ -3806,6 +3820,7 @@ public enum EVRApplicationProperty
IsTemplate_Bool = 61,
IsInstanced_Bool = 62,
IsInternal_Bool = 63,
WantsCompositorPauseInStandby_Bool = 64,
LastLaunchTime_Uint64 = 70,
}
public enum EVRApplicationTransitionState
Expand Down Expand Up @@ -4743,6 +4758,7 @@ public static uint GetInitToken()
public const string k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
public const string k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
public const string k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
public const string k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
public const string k_pch_Dashboard_Section = "dashboard";
public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
Expand Down
7 changes: 7 additions & 0 deletions headers/openvr_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
,{"name": "Prop_DriverDirectModeSendsVsyncEvents_Bool","value": "2043"}
,{"name": "Prop_DisplayDebugMode_Bool","value": "2044"}
,{"name": "Prop_GraphicsAdapterLuid_Uint64","value": "2045"}
,{"name": "Prop_DriverProvidedChaperonePath_String","value": "2048"}
,{"name": "Prop_AttachedDeviceId_String","value": "3000"}
,{"name": "Prop_SupportedButtons_Uint64","value": "3001"}
,{"name": "Prop_Axis0Type_Int32","value": "3002"}
Expand Down Expand Up @@ -238,6 +239,8 @@
,{"name": "VREvent_WatchdogWakeUpRequested","value": "109"}
,{"name": "VREvent_LensDistortionChanged","value": "110"}
,{"name": "VREvent_PropertyChanged","value": "111"}
,{"name": "VREvent_WirelessDisconnect","value": "112"}
,{"name": "VREvent_WirelessReconnect","value": "113"}
,{"name": "VREvent_ButtonPress","value": "200"}
,{"name": "VREvent_ButtonUnpress","value": "201"}
,{"name": "VREvent_ButtonTouch","value": "202"}
Expand Down Expand Up @@ -577,6 +580,7 @@
,{"name": "VRApplicationError_OldApplicationQuitting","value": "112"}
,{"name": "VRApplicationError_TransitionAborted","value": "113"}
,{"name": "VRApplicationError_IsTemplate","value": "114"}
,{"name": "VRApplicationError_SteamVRIsExiting","value": "115"}
,{"name": "VRApplicationError_BufferTooSmall","value": "200"}
,{"name": "VRApplicationError_PropertyNotSet","value": "201"}
,{"name": "VRApplicationError_UnknownProperty","value": "202"}
Expand All @@ -597,6 +601,7 @@
,{"name": "VRApplicationProperty_IsTemplate_Bool","value": "61"}
,{"name": "VRApplicationProperty_IsInstanced_Bool","value": "62"}
,{"name": "VRApplicationProperty_IsInternal_Bool","value": "63"}
,{"name": "VRApplicationProperty_WantsCompositorPauseInStandby_Bool","value": "64"}
,{"name": "VRApplicationProperty_LastLaunchTime_Uint64","value": "70"}
]}
, {"enumname": "vr::EVRApplicationTransitionState","values": [
Expand Down Expand Up @@ -1076,6 +1081,8 @@
"constname": "k_pch_Power_ReturnToWatchdogTimeout_Float","consttype": "const char *const", "constval": "returnToWatchdogTimeout"}
,{
"constname": "k_pch_Power_AutoLaunchSteamVROnButtonPress","consttype": "const char *const", "constval": "autoLaunchSteamVROnButtonPress"}
,{
"constname": "k_pch_Power_PauseCompositorOnStandby_Bool","consttype": "const char *const", "constval": "pauseCompositorOnStandby"}
,{
"constname": "k_pch_Dashboard_Section","consttype": "const char *const", "constval": "dashboard"}
,{
Expand Down
6 changes: 6 additions & 0 deletions headers/openvr_capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ static const char * k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTim
static const char * k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
static const char * k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
static const char * k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
static const char * k_pch_Dashboard_Section = "dashboard";
static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
Expand Down Expand Up @@ -376,6 +377,7 @@ typedef enum ETrackedDeviceProperty
ETrackedDeviceProperty_Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
ETrackedDeviceProperty_Prop_DisplayDebugMode_Bool = 2044,
ETrackedDeviceProperty_Prop_GraphicsAdapterLuid_Uint64 = 2045,
ETrackedDeviceProperty_Prop_DriverProvidedChaperonePath_String = 2048,
ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
Expand Down Expand Up @@ -465,6 +467,8 @@ typedef enum EVREventType
EVREventType_VREvent_WatchdogWakeUpRequested = 109,
EVREventType_VREvent_LensDistortionChanged = 110,
EVREventType_VREvent_PropertyChanged = 111,
EVREventType_VREvent_WirelessDisconnect = 112,
EVREventType_VREvent_WirelessReconnect = 113,
EVREventType_VREvent_ButtonPress = 200,
EVREventType_VREvent_ButtonUnpress = 201,
EVREventType_VREvent_ButtonTouch = 202,
Expand Down Expand Up @@ -838,6 +842,7 @@ typedef enum EVRApplicationError
EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112,
EVRApplicationError_VRApplicationError_TransitionAborted = 113,
EVRApplicationError_VRApplicationError_IsTemplate = 114,
EVRApplicationError_VRApplicationError_SteamVRIsExiting = 115,
EVRApplicationError_VRApplicationError_BufferTooSmall = 200,
EVRApplicationError_VRApplicationError_PropertyNotSet = 201,
EVRApplicationError_VRApplicationError_UnknownProperty = 202,
Expand All @@ -860,6 +865,7 @@ typedef enum EVRApplicationProperty
EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61,
EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62,
EVRApplicationProperty_VRApplicationProperty_IsInternal_Bool = 63,
EVRApplicationProperty_VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64,
EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70,
} EVRApplicationProperty;

Expand Down
7 changes: 7 additions & 0 deletions headers/openvr_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ enum ETrackedDeviceProperty
Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
Prop_DisplayDebugMode_Bool = 2044,
Prop_GraphicsAdapterLuid_Uint64 = 2045,
Prop_DriverProvidedChaperonePath_String = 2048,

// Properties that are unique to TrackedDeviceClass_Controller
Prop_AttachedDeviceId_String = 3000,
Expand Down Expand Up @@ -464,6 +465,8 @@ enum EVREventType
VREvent_WatchdogWakeUpRequested = 109,
VREvent_LensDistortionChanged = 110,
VREvent_PropertyChanged = 111,
VREvent_WirelessDisconnect = 112,
VREvent_WirelessReconnect = 113,

VREvent_ButtonPress = 200, // data is controller
VREvent_ButtonUnpress = 201, // data is controller
Expand Down Expand Up @@ -1504,6 +1507,7 @@ namespace vr
static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";

//-----------------------------------------------------------------------------
// dashboard keys
Expand Down Expand Up @@ -2289,6 +2293,9 @@ class IVRServerDriverHost
* poses across different drivers. Poses are indexed by their device id, and their associated driver and
* other properties can be looked up via IVRProperties. */
virtual void GetRawTrackedDevicePoses( float fPredictedSecondsFromNow, TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0;

/** Notifies the server that a tracked device's display component transforms have been updated. */
virtual void TrackedDeviceDisplayTransformUpdated( uint32_t unWhichDevice, HmdMatrix34_t eyeToHeadLeft, HmdMatrix34_t eyeToHeadRight ) = 0;
};

static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_004";
Expand Down
Binary file modified lib/linux32/libopenvr_api.so
Binary file not shown.
Binary file modified lib/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified lib/win32/openvr_api.lib
Binary file not shown.
Binary file modified lib/win64/openvr_api.lib
Binary file not shown.
Binary file modified samples/bin/linux64/libopenvr_api.so
Binary file not shown.
Binary file modified samples/bin/osx32/libopenvr_api.dylib
Binary file not shown.
Binary file modified samples/bin/win32/openvr_api.dll
Binary file not shown.
Binary file modified samples/bin/win64/openvr_api.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions samples/driver_sample/driver_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <chrono>

#if defined( _WINDOWS )
#include <Windows.h>
#include <windows.h>
#endif

using namespace vr;
Expand Down Expand Up @@ -456,4 +456,4 @@ HMD_DLL_EXPORT void *HmdDriverFactory( const char *pInterfaceName, int *pReturnC
*pReturnCode = VRInitError_Init_InterfaceNotFound;

return NULL;
}
}
9 changes: 5 additions & 4 deletions samples/shared/pathtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
#include "pathtools.h"

#if defined( _WIN32)
#include <Windows.h>
#include <windows.h>
#include <direct.h>
#include <Shobjidl.h>
#include <KnownFolders.h>
#include <Shlobj.h>
#include <shobjidl.h>
#include <knownfolders.h>
#include <shlobj.h>
#include <share.h>

#undef GetEnvironmentVariable
#else
Expand Down
2 changes: 1 addition & 1 deletion src/vrcommon/envvartools_public.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stdlib.h>

#if defined(_WIN32)
#include <Windows.h>
#include <windows.h>

#undef GetEnvironmentVariable
#undef SetEnvironmentVariable
Expand Down
9 changes: 5 additions & 4 deletions src/vrcommon/pathtools_public.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
#include "pathtools_public.h"

#if defined( _WIN32)
#include <Windows.h>
#include <windows.h>
#include <direct.h>
#include <Shobjidl.h>
#include <KnownFolders.h>
#include <Shlobj.h>
#include <shobjidl.h>
#include <knownfolders.h>
#include <shlobj.h>
#include <share.h>

#undef GetEnvironmentVariable
#else
Expand Down
4 changes: 2 additions & 2 deletions src/vrcommon/sharedlibtools_public.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string.h>

#if defined(_WIN32)
#include <Windows.h>
#include <windows.h>
#endif

#if defined(POSIX)
Expand All @@ -22,7 +22,7 @@ SharedLibHandle SharedLib_Load( const char *pchPath )
void *SharedLib_GetFunction( SharedLibHandle lib, const char *pchFunctionName)
{
#if defined( _WIN32)
return GetProcAddress( (HMODULE)lib, pchFunctionName );
return (void*)GetProcAddress( (HMODULE)lib, pchFunctionName );
#elif defined(POSIX)
return dlsym( lib, pchFunctionName );
#endif
Expand Down
6 changes: 4 additions & 2 deletions src/vrcommon/vrpathregistry_public.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#if defined( WIN32 )
#include <windows.h>
#include <Shlobj.h>
#include <shlobj.h>

#undef GetEnvironmentVariable
#elif defined OSX
Expand All @@ -23,7 +23,9 @@
#include <algorithm>

#ifndef VRLog
#if defined( WIN32 )
#if defined( __MINGW32__ )
#define VRLog(args...) fprintf(stderr, args)
#elif defined( WIN32 )
#define VRLog(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
#else
#define VRLog(args...) fprintf(stderr, args)
Expand Down

0 comments on commit 5d0574b

Please sign in to comment.