Don't display duplicate error message box

This commit is contained in:
David Rowe 2015-08-04 16:46:48 -07:00
parent b5fbfc645f
commit 11ec5f5ddf

View file

@ -132,8 +132,8 @@ void EyeTracker::setEnabled(bool enabled, bool simulate) {
_isEnabled = enabled && success;
_isSimulating = _isEnabled && simulate;
if (!success) {
// Display error dialog after updating _isEnabled.
if (!success && result != SMI_ERROR_HMD_NOT_SUPPORTED) {
// Display error dialog after updating _isEnabled. Except if SMI SDK has already displayed an error message.
QMessageBox::warning(nullptr, "Eye Tracker Error", smiReturnValueToString(result));
}
#endif