notaz.gp2x.de
/
sdl_omap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17e1980
)
fix deadlock if ts_cb is not set
author
notaz
<notasas@gmail.com>
Sun, 14 Nov 2010 20:46:46 +0000
(22:46 +0200)
committer
notaz
<notasas@gmail.com>
Sun, 14 Nov 2010 20:46:46 +0000
(22:46 +0200)
src/video/omapdss/osdl_input.c
patch
|
blob
|
blame
|
history
diff --git
a/src/video/omapdss/osdl_input.c
b/src/video/omapdss/osdl_input.c
index
5cc8499
..
fff2ca2
100644
(file)
--- 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)) {