From fa7a5dbdef06f0c997c2b059bf04a0ca1f6f8ab4 Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Tue, 16 Mar 2021 20:55:30 +0000 Subject: [PATCH] Fix Irrlicht not properly resizing on macOS due to incorrect window size; thanks @torleif --- source/Irrlicht/CIrrDeviceOSX.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Irrlicht/CIrrDeviceOSX.mm b/source/Irrlicht/CIrrDeviceOSX.mm index 0be15bb3..c307fd7c 100644 --- a/source/Irrlicht/CIrrDeviceOSX.mm +++ b/source/Irrlicht/CIrrDeviceOSX.mm @@ -821,6 +821,8 @@ void CIrrDeviceMacOSX::setResize(int width, int height) { NSRect driverFrame = [Window contentRectForFrameRect:[Window frame]]; getVideoDriver()->OnResize(core::dimension2d( (s32)driverFrame.size.width, (s32)driverFrame.size.height)); + DeviceWidth = (s32)driverFrame.size.width; + DeviceHeight = (s32)driverFrame.size.height; } else getVideoDriver()->OnResize(core::dimension2d( (s32)width, (s32)height));