mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 23:49:36 +02:00
cocoa: removing the use of the deprecated CGDisplayBitsPerPixel
git-svn-id: trunk@61296 -
This commit is contained in:
parent
51dc36a761
commit
06e3b096ec
@ -1971,7 +1971,19 @@ begin
|
||||
HORZRES:
|
||||
Result := Round(NSScreen.mainScreen.frame.size.width);
|
||||
BITSPIXEL:
|
||||
Result := CGDisplayBitsPerPixel(CGMainDisplayID);
|
||||
// this is based on the main screen only. Should verify what actual DC is passed.
|
||||
// for VIEWS the typical BPP would be 32.
|
||||
case NSScreen.mainScreen.depth of
|
||||
NSWindowDepthTwentyfourBitRGB: //24-bit would be reported as 32
|
||||
Result := 32;
|
||||
NSWindowDepthSixtyfourBitRGB:
|
||||
Result := 64;
|
||||
NSWindowDepthOnehundredtwentyeightBitRGB:
|
||||
Result := 1028;
|
||||
else
|
||||
Result := 32;
|
||||
end;
|
||||
|
||||
PLANES:
|
||||
Result := 1;
|
||||
SIZEPALETTE:
|
||||
|
Loading…
Reference in New Issue
Block a user