The EvtGetEvent function behaves different on T3 simulator and real T3
The timeout parameter in the EvtGetEvent specifies the number of timer ticks 
before checking if there is an event in the event queue. With the value set at 
-1 (evtWaitForever) the T3 only wakes up if there is an event. For any other 
value, it wakes up every "timeout" timerticks to check for an event. If there 
is nothing, it sends an "nilEvent" into the event queue.
The code below works fine on the T3 simulator (OS 5.2.1) where the dot is 
stepping across the screen at a 1 step per second (100 timerticks per second). 
When you move the stylus over the screen sysPenMove events are generated which 
make the dot speed up when ever the stylus is moving.
But;
On the real T3 (the same version:OS 5.2.1) however, the speed at wich the dot 
moves is irrelevent of the parameter of 100 in the EvtGetEvent function. It 
always moves at 100 dots per second. Note that the number of timer ticks per 
seconds is 100.

Anyone know why the real T3 is not behaving??

Regards
Gert



static void AppEventLoop(void)
{
    EventType event;

    do
    {
        static UInt16 x = 0;

        WinEraseLine(x,  80, x,  80);
        x++;
        if (x > 150) x = 0;
        WinDrawLine(x,  80, x,  80);

        EvtGetEvent(&event, 100);


        if (! SysHandleEvent(&event))
        {
            if (! MenuHandleEvent(0, &event, &error))
            {
                if (! AppHandleEvent(&event))
                {
                    FrmDispatchEvent(&event);
                }
            }
        }
    } while (event.eType != appStopEvent);
}

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

Reply via email to