mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-12 18:53:53 +01:00
Fix Irrlicht not properly resizing on macOS due to incorrect window size; thanks @torleif
This commit is contained in:
parent
a3d848ff8b
commit
fa7a5dbdef
@ -821,6 +821,8 @@ void CIrrDeviceMacOSX::setResize(int width, int height)
|
|||||||
{
|
{
|
||||||
NSRect driverFrame = [Window contentRectForFrameRect:[Window frame]];
|
NSRect driverFrame = [Window contentRectForFrameRect:[Window frame]];
|
||||||
getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)driverFrame.size.width, (s32)driverFrame.size.height));
|
getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)driverFrame.size.width, (s32)driverFrame.size.height));
|
||||||
|
DeviceWidth = (s32)driverFrame.size.width;
|
||||||
|
DeviceHeight = (s32)driverFrame.size.height;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)width, (s32)height));
|
getVideoDriver()->OnResize(core::dimension2d<u32>( (s32)width, (s32)height));
|
||||||
|
Loading…
Reference in New Issue
Block a user