Delete calibration message if exit VR display while calibrating

This commit is contained in:
David Rowe 2014-10-04 20:07:37 -07:00
parent 6992b41c5c
commit 32399d8620
2 changed files with 7 additions and 3 deletions

View file

@ -1478,6 +1478,8 @@ void Application::setEnableVRMode(bool enableVRMode) {
OculusManager::connect();
}
OculusManager::recalibrate();
} else {
OculusManager::abandonCalibration();
}
resizeGL(_glWidget->getDeviceWidth(), _glWidget->getDeviceHeight());

View file

@ -293,9 +293,11 @@ void OculusManager::recalibrate() {
void OculusManager::abandonCalibration() {
#ifdef HAVE_LIBOVR
_calibrationState = CALIBRATED;
qDebug() << "Delete calibration message";
Application::getInstance()->getOverlays().deleteOverlay(_calibrationMessage);
_calibrationMessage = 0;
if (_calibrationMessage > 0) {
qDebug() << "Delete calibration message";
Application::getInstance()->getOverlays().deleteOverlay(_calibrationMessage);
_calibrationMessage = 0;
}
#endif
}