[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is the version of MacOS available to CPP ?
From: |
Ben Abbott |
Subject: |
Is the version of MacOS available to CPP ? |
Date: |
Sat, 09 Jun 2012 11:18:51 -0400 |
With MacOS 10.7.x, Apple has deprecated CGDisplayBitsPerPixel. Adding the code
below to display.cc will allow the sources to be built with
"--with-framework-carbon", but isn't the right solution for earlier versions of
MacOS X.
#if defined (HAVE_FRAMEWORK_CARBON)
size_t CGDisplayBitsPerPixel (CGDirectDisplayID display)
{
CGDisplayModeRef mode = CGDisplayCopyDisplayMode (display);
CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding (mode);
if (CFStringCompare (pixelEncoding, CFSTR (IO32BitDirectPixels), 0) == 0)
return 32;
else if (CFStringCompare (pixelEncoding, CFSTR (IO16BitDirectPixels), 0) == 0)
return 16;
else
return 8;
}
#endif
Is the version of MacOS X available to the preprocessor ?
Ben
- Is the version of MacOS available to CPP ?,
Ben Abbott <=
- Re: Is the version of MacOS available to CPP ?, Dr. Alexander Klein, 2012/06/10
- Re: Is the version of MacOS available to CPP ?, Jordi GutiƩrrez Hermoso, 2012/06/10
- Re: Is the version of MacOS available to CPP ?, Ben Abbott, 2012/06/14
- Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/14
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Alexander Hansen, 2012/06/15
- Re: Looking for MacOS 10.5 testers, Ben Abbott, 2012/06/15