At 3:17 PM -0800 3/19/99, [EMAIL PROTECTED] wrote:
>For me, there is one thing in particular-
>When changing the display bit depth from 1 to 2, the display contrast
>setting is reset.
>
>I was hoping a trawl through ContrastAdjust.h would turn up a call to
>restore it.
>Unless there is another way...

Rats.

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.

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.

The contrast adjust dialog actually does this when it opens, so if you just
press the contrast button or call ContrastAdjust() the contrast will
immediately re-adjust itself.  ...but then you're left with a dialog on the
screen.

                                --Bob


Reply via email to