X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvideo%2Fomapdss%2Fosdl_input.c;h=fff2ca2ca485e3141f62b60734361c5e742cbbe6;hb=5646dd9e85cb1a2703cdaa2a8f1a307fb66c6b88;hp=5cc849919413223cc00d2c0c4a02d131e196f2a4;hpb=17e19802bcb08b2a79e39f84e93750f912f56609;p=sdl_omap.git diff --git a/src/video/omapdss/osdl_input.c b/src/video/omapdss/osdl_input.c index 5cc8499..fff2ca2 100644 --- a/src/video/omapdss/osdl_input.c +++ b/src/video/omapdss/osdl_input.c @@ -636,9 +636,7 @@ int omapsdl_input_get_events(int timeout_ms, fd = osdl_evdev_devs[i]; #if SDL_INPUT_TSLIB - if (fd == osdl_tslib_fd) { - if (ts_cb == NULL) - continue; + if (fd == osdl_tslib_fd && ts_cb != NULL) { while (1) { struct ts_sample tss; ret = ts_read(osdl_tslib_dev, &tss, 1); @@ -650,7 +648,9 @@ int omapsdl_input_get_events(int timeout_ms, } continue; } + /* else read below will consume the event, even if it's from ts */ #endif + while (1) { ret = read(fd, &ev, sizeof(ev)); if (ret < (int)sizeof(ev)) {