History

Fix possible hang when switching out of Oculus mode

Brad Davis committed 11 years ago

Commit 382de2b1 parent ae8c3a11 file · +4 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+4−2
@@ -4761,9 +4761,11 @@ void Application::updateDisplayMode() { · 4760 unmodified lines
4761 qDebug() << "Deferring plugin switch until out of painting";4761 qDebug() << "Deferring plugin switch until out of painting";
4762 // Have the old plugin stop requesting renders4762 // Have the old plugin stop requesting renders
4763 oldDisplayPlugin->stop();4763 oldDisplayPlugin->stop();
4764 QCoreApplication::postEvent(this, new LambdaEvent([this] {4764 QTimer* timer = new QTimer();
4765 timer->singleShot(500, [this, timer] {
4766 timer->deleteLater();
4765 updateDisplayMode();4767 updateDisplayMode();
4766 }));4768 });
4767 return;4769 return;
4768 }4770 }
4769 4771