1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Merge pull request #2358 from xyzz/fix-resolution

engine: fix window creation when SDL returns different-sized window
This commit is contained in:
Bret Curtis 2019-05-02 13:36:38 +02:00 committed by GitHub
commit f7af193059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()