Using the general prefs settings to change to depth 4 doesn't work?  Alex
--
Dr. Alexander R. Pruss
Department of Philosophy
Georgetown University
Washington, DC 20057-1133  U.S.A.
e-mail: [EMAIL PROTECTED]
online papers and home page: www.georgetown.edu/faculty/ap85
----------------------------------------------------------------------------
-
   "Philosophiam discimus non ut tantum sciamus, sed ut boni efficiamur."
       - Paul of Worczyn (1424)
----- Original Message ----- 
From: "Nguyen The Toan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 1:15 PM
Subject: SJ20 HiRes grayscale mode


>
> Hi, I have a Clie SJ20 which supports HiRes 16 grayscale. However, the
default
> HiRes mode is B&W. One needs to explicitly set the screen depth to 4 in
order
> to get HiRes 16 grayscale. I hope the following code from Vexed source can
> help:
>
>
> Err    err;
> UInt16 cBpp;
> UInt32 dwVer;
> UInt32 dwDepth = 0;
>
> UInt32 dwDepthsSupported = 0;
> static Int16 gaBpps[] = { 0 /*24*/, 0 /* 16 */, 8, 4, 2, 1 };
> Int8   n;
>
> FtrGet(sysFtrCreator, sysFtrNumROMVersion, &dwVer);
> if (dwVer < 0x03003000) {
>         cBpp = 1;
>         return cBpp;
> }
>
> // Get the depths supported
> WinScreenMode(winScreenModeGetSupportedDepths, NULL, NULL,
&dwDepthsSupported,
> NULL);
>
> // Set the highest depth possible
>
> cBpp = 1;
> for (n = 0; n < 6; n++) {
>         if (dwDepthsSupported & (1UL << (gaBpps[n] - 1))) {
>                 WinScreenMode(winScreenModeGet, NULL, NULL, &dwDepth,
NULL);
>                 if (dwDepth != gaBpps[n]) {
>                         dwDepth = gaBpps[n];
>                         err = WinScreenMode(winScreenModeSet, NULL, NULL,
> &dwDepth, NULL);
>                         if (err == 0) {
>                                         cBpp = (int)dwDepth;
>                                         break;
>                         }
>                 } else {
>                         cBpp = (int)dwDepth;
>                         break;
>                 }
>         }
> }
>
>
> _______________________________________________
> plucker-dev mailing list
> [EMAIL PROTECTED]
> http://lists.rubberchicken.org/mailman/listinfo/plucker-dev
>

_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev

Reply via email to