Changed code to correct type

This commit is contained in:
Fluffy Jenkins 2019-12-19 23:34:29 +00:00
parent 7d402f4bae
commit 95c7998720

View file

@ -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!";