Hi to all,

I have a game and it uses the hard keys.
If one key is kept pressed it does repeat the KeyPress
events too fast. I would like to SLOW it down or make
it only one event.
How do I do that?
I use this GameMask.

static void GameMaskKeys ()
{
        UInt16 initDelay;
        UInt16 period;
        Boolean queueAhead;

        // Set the keys we poll to not generate events.  This
saves cpu cycles.
        KeySetMask(     ~(Key1 | Key2 | Key3 | Key4) );
        
        // Avoid the code below because KeyRates is broken.
        //return;
        
        // Also set the key repeat rate low to avoid
constantly checking them.
        initDelay = slowestKeyDelayRate;
        period = slowestKeyPeriodRate;
        queueAhead = true;
        KeyRates(true, &initDelay, &period, &period,
&queueAhead);
} 


Thanks a lot
Giorgos

____________________________________________________________
Do You Yahoo!?
Αποκτήστε τη δωρεάν @yahoo.gr διεύθυνση σας στο http://www.otenet.gr

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

Reply via email to