mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
Changed code to correct type
This commit is contained in:
parent
7d402f4bae
commit
95c7998720
1 changed files with 3 additions and 3 deletions
|
@ -108,11 +108,11 @@ QString getVrSettingString(const char* section, const char* setting) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int headsetNotConnected = -1;
|
bool isHMDConnected = false;
|
||||||
|
|
||||||
vr::IVRSystem* acquireOpenVrSystem() {
|
vr::IVRSystem* acquireOpenVrSystem() {
|
||||||
bool hmdPresent = vr::VR_IsHmdPresent();
|
bool hmdPresent = vr::VR_IsHmdPresent();
|
||||||
if (hmdPresent && (headsetNotConnected <= 0)) {
|
if (hmdPresent && (!isHMDConnected)) {
|
||||||
Lock lock(mutex);
|
Lock lock(mutex);
|
||||||
if (!activeHmd) {
|
if (!activeHmd) {
|
||||||
#if DEV_BUILD
|
#if DEV_BUILD
|
||||||
|
@ -126,7 +126,7 @@ vr::IVRSystem* acquireOpenVrSystem() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (eError == 108) { // vr::HmdError_Init_HmdNotFound
|
if (eError == 108) { // vr::HmdError_Init_HmdNotFound
|
||||||
headsetNotConnected = 1;
|
isHMDConnected = true;
|
||||||
activeHmd = nullptr;
|
activeHmd = nullptr;
|
||||||
#if DEV_BUILD
|
#if DEV_BUILD
|
||||||
qCDebug(displayplugins) << "OpenVR: No HMD connected, setting nullptr!";
|
qCDebug(displayplugins) << "OpenVR: No HMD connected, setting nullptr!";
|
||||||
|
|
Loading…
Reference in a new issue