[SDL] help with keystate

bertold bertold at redwhitearmy.com
Wed Oct 20 12:27:30 PDT 2004


i add remote control to SDL.
At handle_keyboard() just reading and evaluate scan code, calling
TranslateKey() and...
Now. i don't have key press and release states, so decided to simulate
and after TranslateKey() calling twice
SDL_PrivateKeyboard(SDL_PRESSED,event)
SDL_PrivateKeyboard(SDL_RELEASED,event)

It is working for number of game, but net-bubble can't see an event.
The code  in net-bubble calling, in loop, PumpEvents() and checking keys
by looking at keystate[<key name>]

My question is:
Is there possible that nothing gets to the game cause when check
of keystate happened the state of key already back to RELEASED?

Any suggestions to fix?




More information about the SDL mailing list