mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fixed something thats for sure
This commit is contained in:
parent
95c7998720
commit
6563d32395
1 changed files with 4 additions and 4 deletions
|
@ -108,11 +108,11 @@ QString getVrSettingString(const char* section, const char* setting) {
|
|||
return result;
|
||||
}
|
||||
|
||||
bool isHMDConnected = false;
|
||||
bool isHMDInErrorState = false;
|
||||
|
||||
vr::IVRSystem* acquireOpenVrSystem() {
|
||||
bool hmdPresent = vr::VR_IsHmdPresent();
|
||||
if (hmdPresent && (!isHMDConnected)) {
|
||||
if (hmdPresent && !isHMDInErrorState) {
|
||||
Lock lock(mutex);
|
||||
if (!activeHmd) {
|
||||
#if DEV_BUILD
|
||||
|
@ -125,8 +125,8 @@ vr::IVRSystem* acquireOpenVrSystem() {
|
|||
qCDebug(displayplugins) << "OpenVR display: HMD is " << activeHmd << " error is " << eError;
|
||||
#endif
|
||||
|
||||
if (eError == 108) { // vr::HmdError_Init_HmdNotFound
|
||||
isHMDConnected = true;
|
||||
if (eError == vr::VRInitError_Init_HmdNotFound) {
|
||||
isHMDInErrorState = true;
|
||||
activeHmd = nullptr;
|
||||
#if DEV_BUILD
|
||||
qCDebug(displayplugins) << "OpenVR: No HMD connected, setting nullptr!";
|
||||
|
|
Loading…
Reference in a new issue