OSVR / OSVR-Vive

OSVR driver for use with the HTC Vive (including Vive PRE)
Apache License 2.0
62 stars 19 forks source link

Update for steamvr changes #15

Closed rpavlik closed 8 years ago

rpavlik commented 8 years ago

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:

rpavlik commented 8 years ago

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.