> I should point out that this is all on PalmSim (OS/5, not 5.2). I have no
> idea of the behavior on a T-T or whatnot. If someone wants to try a simple
> test on a real device, I'd appreciate it.

    // get the current display information
    WinScreenGetAttribute(winScreenWidth,  &gGlobals.gfx.width);
    WinScreenGetAttribute(winScreenHeight, &gGlobals.gfx.height);

    // which depth do we have?
    switch (gGlobals.gfx.width)
    {
      case 160: gGlobals.gfx.density = kDensityLow;         break;
      case 240: gGlobals.gfx.density = kDensityOneAndAHalf; break;
      case 320: gGlobals.gfx.density = kDensityDouble;      break;
      default:  gGlobals.gfx.width   = 160;
                gGlobals.gfx.height  = 160;
                gGlobals.gfx.density = kDensityLow;         break;
    }
    gGlobals.gfx.device_id = DEVICE_PALM_HDD;

    depthPtr = &depthsToTry[0];
    while (WinScreenMode(winScreenModeSet, NULL, NULL, depthPtr, NULL))
      depthPtr++;

    gGlobals.gfx.depth = *depthPtr;
    WinSetCoordinateSystem(kCoordinatesNative);

    WinSetDrawWindow(WinGetDisplayWindow());
    WinDrawLine(0, 0, gGlobals.gfx.width, gGlobals.gfx.height);
    SysTaskDelay(1000);

- guess what? that worked for me on palmsim. the about version says
5.0.0.23 (which, i am probably outdated) *g*

---
Aaron Ardiri                           [EMAIL PROTECTED]
CEO - CTO                                              +46 70 656 1143
Mobile Wizardry                         http://www.mobilewizardry.com/


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

Reply via email to