Get desktop resolution with NULL driver in Mac

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Get desktop resolution with NULL driver in Mac

Post by xDan »

Hello, it would be nice to be able to get the current desktop resolution when starting with the NULL driver in Mac. (currently just returns a size of 0,0). This is possible in Windows and Linux.

you can in CIrrDeviceMacOSX::createWindow remove the line:

Code: Select all

VideoModeList.setDesktop(CreationParams.Bits, core::dimension2d<u32>(ScreenWidth, ScreenHeight)); 
and instead, in the constructor (e.g. before the call to createWindow), have

Code: Select all

VideoModeList.setDesktop(CreationParams.Bits, core::dimension2d<u32>([[NSScreen mainScreen] frame].size.width,
                        [[NSScreen mainScreen] frame].size.height));
"seems to work"
Post Reply