mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 20:24:03 +02:00
Fallback to desktop if display plugin fails
This commit is contained in:
parent
931cad34d1
commit
37a725b06d
1 changed files with 11 additions and 1 deletions
|
@ -4892,7 +4892,17 @@ void Application::updateDisplayMode() {
|
|||
|
||||
// FIXME probably excessive and useless context switching
|
||||
_offscreenContext->makeCurrent();
|
||||
newDisplayPlugin->activate();
|
||||
|
||||
// If the new plugin fails to activate, fallback to first item on the list
|
||||
if (!newDisplayPlugin->activate()) {
|
||||
qWarning() << "Failed to activate plugin: " << newDisplayPlugin->getName();
|
||||
newDisplayPlugin = displayPlugins.at(0);
|
||||
qWarning() << "Activating fallback plugin: " << newDisplayPlugin->getName();
|
||||
if (!newDisplayPlugin->activate()) {
|
||||
qFatal("Failed to activate fallback plugin");
|
||||
}
|
||||
}
|
||||
|
||||
_offscreenContext->makeCurrent();
|
||||
offscreenUi->resize(fromGlm(newDisplayPlugin->getRecommendedUiSize()));
|
||||
_offscreenContext->makeCurrent();
|
||||
|
|
Loading…
Reference in a new issue