Thanks Tolga. I tried your code but no luck I'm afraid. The only
difference between your code and mine seems to be you have 25 seconds
reservation instead of kCGMaxDisplayReservationInterval (which
shouldn't matter as the max interval is 15 seconds), and set your
fade-in to asynchronous instead of synchronous (TRUE = wait for
completion, not the other way around). But no, I still only have
random success... Any other ideas?

Thanks.

On Wed, Aug 13, 2008 at 8:07 PM, Tolga Katas <[EMAIL PROTECTED]> wrote:
> - (void)fadeOut:(float)seconds
> {
> err = CGAcquireDisplayFadeReservation (25, &tokenPtr);
> CGDisplayFade (tokenPtr,
>   seconds,                        // 1 second
>   kCGDisplayBlendNormal,      // start
>   kCGDisplayBlendSolidColor,  // end
>   0.0, 0.0, 0.0,              // black
>   TRUE                       // don't wait to finish
>   );
>
>
>
> }
> - (void)fadeBackIn:(float)seconds
> {
>
> CGDisplayFade (
>   tokenPtr,
>   seconds,
>   kCGDisplayBlendSolidColor,
>   kCGDisplayBlendNormal,
>   0.0, 0.0, 0.0,
>   FALSE
>   );
>
> err = CGReleaseDisplayFadeReservation (tokenPtr);
> }
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to