Showing the changes to libraries/input-plugins/src/input-plugins/ViveControllerManager.cpp (1 of 1 file). Show all
Unified · Split
| @@ -65,7 +65,14 @@ ViveControllerManager::ViveControllerManager() : · 64 unmodified lines | ||
| 65 | 65 | |
| 66 | 66 | bool ViveControllerManager::isSupported() const { |
| 67 | 67 | #ifdef Q_OS_WIN |
| 68 | − return vr::VR_IsHmdPresent(); | |
| 68 | + bool success = vr::VR_IsHmdPresent(); | |
| 69 | + if (success) { | |
| 70 | + vr::HmdError eError = vr::HmdError_None; | |
| 71 | + auto hmd = vr::VR_Init(&eError); | |
| 72 | + success = (hmd != nullptr); | |
| 73 | + vr::VR_Shutdown(); | |
| 74 | + } | |
| 75 | + return success; | |
| 69 | 76 | #else |
| 70 | 77 | return false; |
| 71 | 78 | #endif |