On 2006-08-05, Luc Le Blanc <[EMAIL PROTECTED]> wrote:
> .... < snip> .....
>
> I wanted to restrict the DIA presence check to hi-res devices, but 
> interestingly, when I run the following code on the Zire 22 Simulator, I 
> determine that the device has a double density screen...
>
> UInt16 density = 0;
>
> while ( ( WinGetSupportedDensity( &density ) == errNone ) && ( density 
> != 0 ) )
>      switch ( density )
>      {
>          case kCoordinatesOneAndAHalf: gScreenRes = PalmOneAndAHalf; break;
>          case kCoordinatesDouble:      gScreenRes = PalmDouble; break;
>          case kCoordinatesTriple:      gScreenRes = PalmTriple; break;
>          case kCoordinatesQuadruple:   gScreenRes = PalmQuadruple; break;
>      }
>
> Running in the CW debugger, I see density reaches 144 (i.e. 
> kCoordinatesDouble). But isn't the Zire 22 low-res???
>

There is a note on the SDK doc for WinGetSupportedDensity:
-------------------------------------------------------------------------------
NOTE: The densities reported by this function are those that are supported 
by the blitter. These densities are not necessarily supported by the 
underlying hardware. A handheld with a low-density screen that is able to 
scale high-density bitmaps will report that it can handle both high and 
low density bitmaps. Use WinScreenGetAttribute() to determine the density 
of the handheld's screen.
-------------------------------------------------------------------------------
So also use WinScreenGetAttribute(winScreenDensity, &attribute);

Ton

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to