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
released.==================
SDL_fbevents.c:
/* Handle input from tslib */
#if SDL_INPUT_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);
}
return;
}
#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:=======================
while(1)
{
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,
Jiangshan
ā
Best wishes,
Jiangshan