mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 03:45:37 +00:00
engine: fix window creation when SDL returns different-sized window
This commit is contained in:
parent
c3cebbfaf6
commit
1d02c1ef37
1 changed files with 2 additions and 2 deletions
|
@ -428,11 +428,11 @@ void OMW::Engine::createWindow(Settings::Manager& settings)
|
|||
|
||||
osg::ref_ptr<osg::Camera> camera = mViewer->getCamera();
|
||||
camera->setGraphicsContext(graphicsWindow);
|
||||
camera->setViewport(0, 0, width, height);
|
||||
camera->setViewport(0, 0, traits->width, traits->height);
|
||||
|
||||
mViewer->realize();
|
||||
|
||||
mViewer->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height);
|
||||
mViewer->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, traits->width, traits->height);
|
||||
}
|
||||
|
||||
void OMW::Engine::setWindowIcon()
|
||||
|
|
Loading…
Reference in a new issue