This pull request resolves issues #14, #11, and replaces/incorporates pull request #12 (extending it by using the getinterfaceversions() call and checking the versions to ensure we're performing valid casts that won't cause crashes).
The OpenVR submodule is updated to 1.0.1, with the accompanying API changes - interface version strings were pulled from the signature of some methods. Instead, it's now essentially required for the host to verify that GetInterfaceVersions returns expected version strings to ensure the casts performed following the interface retrievals are in fact typesafe - if these checks are not done, memory corruption can result. The standalone apps as well as the OSVR plugin now all perform a check of the interface version strings and print some form of useful message if there is a meaningful mismatch.
A few smaller changes are in here, too: license updates for the property-related headers (to match OpenVR license), struct-based return values where there's a return value and an error code, signalling permanent failures from within a level of the plugin that couldn't before, avoiding unnecessary plugin work if you're running an incompatible version.
Compatibility:
This plugin runs with the current SteamVR stable release on Windows: SteamVR Version 2016-06-08 (1465424737)
It will not work with the current beta on Windows, which introduces a IClientTrackedDeviceProvider_004, which is not publicly available through the OpenVR repo.
It does not work with the previous stable from June 1, 1464744840 (which is still available through the "betas" list in steamvr), due to the bump from IVRDisplayComponent_001 to IVRDisplayComponent_002 (in splitting out the oculus/controlled direct mode component), but likely would if the OpenVR submodule was rolled back to a previous version.
I have not checked the interface symbols on any other platform than Windows at this time.
A verification of the driver strings on Linux and Mac confirm that all platforms currently use the same interface versions, so this should be a safe merge.
This pull request resolves issues #14, #11, and replaces/incorporates pull request #12 (extending it by using the getinterfaceversions() call and checking the versions to ensure we're performing valid casts that won't cause crashes).
The OpenVR submodule is updated to 1.0.1, with the accompanying API changes - interface version strings were pulled from the signature of some methods. Instead, it's now essentially required for the host to verify that GetInterfaceVersions returns expected version strings to ensure the casts performed following the interface retrievals are in fact typesafe - if these checks are not done, memory corruption can result. The standalone apps as well as the OSVR plugin now all perform a check of the interface version strings and print some form of useful message if there is a meaningful mismatch.
A few smaller changes are in here, too: license updates for the property-related headers (to match OpenVR license), struct-based return values where there's a return value and an error code, signalling permanent failures from within a level of the plugin that couldn't before, avoiding unnecessary plugin work if you're running an incompatible version.
Compatibility:
SteamVR Version 2016-06-08 (1465424737)
IClientTrackedDeviceProvider_004
, which is not publicly available through the OpenVR repo.IVRDisplayComponent_001
toIVRDisplayComponent_002
(in splitting out the oculus/controlled direct mode component), but likely would if the OpenVR submodule was rolled back to a previous version.