mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
Address crashes on exit
This commit is contained in:
parent
900c2c11df
commit
80ee31edd9
1 changed files with 11 additions and 3 deletions
|
@ -14,15 +14,23 @@ WindowOpenGLDisplayPlugin::WindowOpenGLDisplayPlugin() {
|
|||
}
|
||||
|
||||
glm::uvec2 WindowOpenGLDisplayPlugin::getRecommendedRenderSize() const {
|
||||
return toGlm(_window->geometry().size() * _window->devicePixelRatio());
|
||||
uvec2 result;
|
||||
if (_window) {
|
||||
result = toGlm(_window->geometry().size() * _window->devicePixelRatio());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
glm::uvec2 WindowOpenGLDisplayPlugin::getRecommendedUiSize() const {
|
||||
return toGlm(_window->geometry().size());
|
||||
uvec2 result;
|
||||
if (_window) {
|
||||
result = toGlm(_window->geometry().size());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool WindowOpenGLDisplayPlugin::hasFocus() const {
|
||||
return _window->isActive();
|
||||
return _window ? _window->isActive() : false;
|
||||
}
|
||||
|
||||
void WindowOpenGLDisplayPlugin::initSurfaceFormat(QSurfaceFormat& format) {
|
||||
|
|
Loading…
Reference in a new issue