Hi,
When I run this code on my imac with external 23 inch display. uname -a Darwin intelImac.local 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386
I get the following output : [Session started at 2006-12-26 14:41:05 +0100.] Display 424a6d5: IODisplayGetFloatParameter(-536870201), -1.999818 Display 4271600: IODisplayGetFloatParameter(0), 0.000000
bright has exited with status 0.
Which shows : err = IODisplayGetFloatParameter(service, kNilOptions, key, &value); returning with -536870201
Is this code no longer up to date ? Should I file this as a bug ?
This is the code a bit simplified : err = CGGetOnlineDisplayList(8, displayIDs, &max); key = CFSTR(kIODisplayBrightnessKey); service = CGDisplayIOServicePort(displayIDs[i]); err = IODisplayGetFloatParameter(service, kNilOptions, key, &value);
Dirk |