As far as I can tell, there are two problems with this code:
1. The Palm IIIx doesn't have software contrast control, so this won't help
with the IIIx. Only the Palm V.
2. This works around a bug in the Palm V running under OS 3.1. However, it
ends up breaking on the Handspring Visor running OS 3.1 (it may also break
the Palm V running 3.3--not sure). The bug in the Palm V (from what I've
been told) is that the OS resets the contrast to default when you change
modes. However, on the Visor, not only does the contrast not reset to
default, it automatically darkens to adjust for the fact that grayscale is
lighter than black and white. You are going through and undoing that
darkening.
---
--On Sat, Nov 20, 1999 8:47 AM +1000 Stephen Best <[EMAIL PROTECTED]>
wrote:
>
>> So the question is this. Is there something I can do about this annoying
>> contrast issue? Is there an API to set it? I know I can bring up the
>> slider on the V, but I don't think there's an API to set it in OS 3.x in
>> general, correct?
>
> This is the code I use (you'll need the OS 3.1 headers):
>
> Stephen Best
> Bitware Australia
> -------------------------------------------------------------------
>
> // Get features by OS version
>
> FtrGet (sysFtrCreator, sysFtrNumROMVersion, &romVersion);
>
> supportGrayscale = ( romVersion >= 0x03000000 ? true : false );
> supportContrast = ( romVersion >= 0x03100000 ? true : false );
>
> // Turn grayscale on
>
> if ( supportGrayscale )
> {
> if ( supportContrast )
> contrastSave = SysLCDContrast (false, 0);
>
> setGrayscale = false;
>
> ScrDisplayMode (scrDisplayModeGet, NULL, NULL, &depth, NULL);
>
> if ( depth < 2 )
> {
> depth = 2;
>
> if ( !ScrDisplayMode (scrDisplayModeSet, NULL, NULL, &depth, NULL) )
> setGrayscale = true;
> }
>
> if ( supportContrast )
> SysLCDContrast (true, contrastSave);
> }
>
> // Turn grayscale off
>
> if ( supportGrayscale )
> {
> if ( setGrayscale )
> ScrDisplayMode (scrDisplayModeSetToDefaults, NULL, NULL, NULL,
> NULL);
>
> if ( supportContrast )
> SysLCDContrast (true, contrastSave);
> }
>
>
>
>
>