I wrote an application to render live video on the screen.
Since keyboard / mouse interaction are expected, I used the following code
structure to handle user inputs:
while (SDL_WaitEvent(& event))
// do something here.
However, I found one problem here:
When I use this application on laptops, the event handling thing performs
extremely slow. Basicly, the keyboard event will be detected about half a
minute (or so) after I pressed the keyboard.
However, this effect doesn’t exist when I use this application on desktops. It
responed to my keyboard action immidiately.
I tried the same applicaion on two laptops and two desktops. All these
computers have large RAM (three with 512M and one with 1G). Both laptops have
Celeron 1.7 cpus and one desktop has Intel P4 3.2G cpu and another is Intel P1
The video images are rendered fine on all computers and the cpu usage on all
computers are fairly similar (about 50%).
Could anyone who has ideas about this give me some suggestions please?
07 - April - 2006.