Skip to content

Commit

Permalink
Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
r57zone committed Oct 27, 2021
1 parent b10101a commit b2c7f4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OpenVR/samples/driver_arduinohmd/driver_arduinohmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ void ArduinoIMURead()
HMDInitCentring = true;
}
}

if (bytesRead == 0) Sleep(1);
}
}

Expand Down Expand Up @@ -505,7 +507,7 @@ class CDeviceDriver : public vr::ITrackedDeviceServerDriver, public vr::IVRDispl
}

// Centering
if ((GetAsyncKeyState(m_centeringKey) & 0x8000) != 0 || ((GetAsyncKeyState(VK_CONTROL) & 0x8000) != 0 && (GetAsyncKeyState(VK_MENU) & 0x8000) != 0 && (GetAsyncKeyState('R') & 0x8000) != 0))
if ( (GetAsyncKeyState(m_centeringKey) & 0x8000) != 0 || ( (GetAsyncKeyState(VK_CONTROL) & 0x8000) != 0 && (GetAsyncKeyState(VK_MENU) & 0x8000) != 0 && (GetAsyncKeyState('R') & 0x8000) != 0) )
SetCentering();

// Set head tracking rotation
Expand Down

0 comments on commit b2c7f4b

Please sign in to comment.