mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 13:12:57 +02:00
Merge pull request #5557 from jherico/marge
Fixing crash in vive controllers
This commit is contained in:
commit
acf9933925
1 changed files with 8 additions and 1 deletions
|
@ -65,7 +65,14 @@ ViveControllerManager::ViveControllerManager() :
|
|||
|
||||
bool ViveControllerManager::isSupported() const {
|
||||
#ifdef Q_OS_WIN
|
||||
return vr::VR_IsHmdPresent();
|
||||
bool success = vr::VR_IsHmdPresent();
|
||||
if (success) {
|
||||
vr::HmdError eError = vr::HmdError_None;
|
||||
auto hmd = vr::VR_Init(&eError);
|
||||
success = (hmd != nullptr);
|
||||
vr::VR_Shutdown();
|
||||
}
|
||||
return success;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue