[hatari-devel] New FileSelector

Eero Tamminen eerot at users.berlios.de
Sun Sep 12 22:29:21 CEST 2010


On Saturday 11 September 2010, Laurent Sallafranque wrote:
> For key repeating, it seems to me that I need to use :
>          if (SDL_PollEvent(&sdlEvent) == 1)  /* Wait for events */
> instead of
>          if (SDL_WaitEvent(&sdlEvent) == 1)  /* Wait for events */

On Linux?

AFAIK on X key repeat should be generated at the X server side, not at
client end, so there should be a repeat event.  If there isn't a repeat
event, I think that's an SDL bug that should be reported against it (maybe
SDL_WaitEvent event mask is incorrect)...

> The first one puts my CPU to 100%, but I can get the state of the UP or
> DOWN keys everytime.

Adding something like SDL_Delay(100) between the SDL_PollEvent() calls
should help a bit with the CPU usage.

	- Eero

More information about the hatari-devel mailing list