SDL_PollEvent tslib bug?/// Re: SDL_PollEvent not return until tslib touching up?

I find the reason of the problem. in SDL_fbevent.c handle_tslib function.
If touch screen is pressed, the ts_read will always return a touch
point, so handle_tslib function will not return until touch screen is
/* Handle input from tslib */
static void handle_tslib(_THIS)
struct ts_sample sample;
int button;

// FIXME HERE. jiangshan. while--->if
while(ts_read(ts_dev, &sample, 1) > 0) {
	button = (sample.pressure > 0) ? 1 : 0;
	button <<= 2;	/* must report it as button 3 */
	FB_vgamousecallback(button, 0, sample.x, sample.y);

#endif /* SDL_INPUT_TSLIB */

Change the wile to if will fix it.

2011/7/1, ??? <@jiangshan00000_at_gm>:

Iā€™m using SDL on a embedded linux system.
I compiled the SDL version 1.2.14.
The input is tslib touch.
I call the SDL_PollEvent function something like below:

if (SDL_PollEvent(&event))
// deal event

// do something else

The problem is that:
when i touch the screen, and move my figure on the screen, the SDL
cursor moves with my figure, but the SDL_PollEvent function will not
return until i remove my figure from the touch screen. I can not
handle the touch (mouse) move event immediately.

It looks like SDL_mutexP function probelm?

Does anyone meet the same problem?
Or any suggestion?

Best wishes,

Best wishes,