Fix not properly resizing on macOS due to incorrect window size

Thanks @torleif, Jordach and sfan5 for patch in Minetest: fa7a5dbdef
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
This commit is contained in:
cutealien 2022-04-21 20:21:56 +00:00
parent 4d8d638ce2
commit a48b3a8d00

View File

@ -821,6 +821,8 @@ void CIrrDeviceMacOSX::setResize(int width, int height)
{
NSRect driverFrame = [Window contentRectForFrameRect:[Window frame]];
getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)driverFrame.size.width, (s32)driverFrame.size.height));
DeviceWidth = (s32)driverFrame.size.width;
DeviceHeight = (s32)driverFrame.size.height;
}
else
getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)width, (s32)height));