Fix possible hang when switching out of Oculus mode

This commit is contained in:
Brad Davis 2015-09-09 14:09:01 -07:00
parent ae8c3a19ed
commit 382de2b4aa

View file

@ -4761,9 +4761,11 @@ void Application::updateDisplayMode() {
qDebug() << "Deferring plugin switch until out of painting";
// Have the old plugin stop requesting renders
oldDisplayPlugin->stop();
QCoreApplication::postEvent(this, new LambdaEvent([this] {
QTimer* timer = new QTimer();
timer->singleShot(500, [this, timer] {
timer->deleteLater();
updateDisplayMode();
}));
});
return;
}