On Tue, 30 Mar 1999, Bob Ebert wrote:

> Anyway, here's the scoop:
> 
> ScrDisplayMode inits the hardware when it changes the depth.  As part of
> reinitializing the hardware, the hardware contrast is set to a default
> value.
> 
> Clearly that's not right.  (But, on the other hand, PalmOS doesn't
> officialy support grayscale (yet), so don't complain too much, OK?)
> 
> Anyway, as to how to work around this for the time being... the best
> (hacky) way is to use SysLCDContrast twice, once to get the value and then
> again to reset the value.
> 
> That is: SysLCDContrast(true, SysLCDContrast(false, 0));
> 
> This works because SysLCDContrast saves the user's setting--it has to, so
> the contrast can be set properly when we turn the display off and back on.
> Anyway, it returns the saved setting rather than read the hardware.  So
> when you call it to read, you get the old user value, then when you call it
> a 2nd time to write, you force the old saved value back into the hardware
> setting.

Just one comment: it's possible that two saved contrast settings will be
necessary, one for B&W, the other for grayscale.

-- 
Kenneth Albanowski ([EMAIL PROTECTED], CIS: 70705,126)


Reply via email to