From a48b3a8d005451f310ca02571a73666dfd1d4a8d Mon Sep 17 00:00:00 2001 From: cutealien Date: Thu, 21 Apr 2022 20:21:56 +0000 Subject: [PATCH] Fix not properly resizing on macOS due to incorrect window size Thanks @torleif, Jordach and sfan5 for patch in Minetest: https://github.com/minetest/irrlicht/commit/fa7a5dbdef06f0c997c2b059bf04a0ca1f6f8ab4 Forum: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=2&t=52819&p=306518#p306518 Note: Not tested by me, as usual with OSX patches I just apply it as it seems to make sense. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6351 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CIrrDeviceOSX.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Irrlicht/CIrrDeviceOSX.mm b/source/Irrlicht/CIrrDeviceOSX.mm index effbe4b0..dfa2cf5e 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));