Fix Irrlicht not properly resizing on macOS due to incorrect window size; thanks @torleif

This commit is contained in:
Jordan Snelling 2021-03-16 20:55:30 +00:00 committed by sfan5
parent a3d848ff8b
commit fa7a5dbdef

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));