* Call vr::VR_Shutdown() when ref-count goes to zero. The ref-count is ncessary because the vr::IVRSystem poitner is shared between the the openvr input and display plugins. * OpenVR plugins options will display in the menu if vr::VR_IsHmdPresent() is true. This is faster then initializing all of openvr and less likely to conflict with the oculus display plugin.
Showing the changes to plugins/oculus/src/OculusBaseDisplayPlugin.cpp (1 of 4 files). Show all
Unified · Split
| @@ -39,6 +39,7 @@ glm::mat4 OculusBaseDisplayPlugin::getHeadPose(uint32_t frameIndex) const { · 38 unmodified lines | ||
| 39 | 39 | |
| 40 | 40 | bool OculusBaseDisplayPlugin::isSupported() const { |
| 41 | 41 | if (!OVR_SUCCESS(ovr_Initialize(nullptr))) { |
| 42 | + qDebug() << "OculusBaseDisplayPlugin : ovr_Initialize() failed"; | |
| 42 | 43 | return false; |
| 43 | 44 | } |
| 44 | 45 | |
| @@ -48,6 +49,7 @@ bool OculusBaseDisplayPlugin::isSupported() const { · 3 unmodified lines | ||
| 48 | 49 | if (!OVR_SUCCESS(result)) { |
| 49 | 50 | ovrErrorInfo error; |
| 50 | 51 | ovr_GetLastErrorInfo(&error); |
| 52 | + qDebug() << "OculusBaseDisplayPlugin : ovr_Create() failed" << result << error.Result << error.ErrorString; | |
| 51 | 53 | ovr_Shutdown(); |
| 52 | 54 | return false; |
| 53 | 55 | } |