From: "Alexey I. Froloff" <[email protected]>
---
wmMatrix/xutils.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/wmMatrix/xutils.c b/wmMatrix/xutils.c
index b098cb1..6adb87b 100644
--- a/wmMatrix/xutils.c
+++ b/wmMatrix/xutils.c
@@ -371,9 +371,12 @@ unsigned long getBlendedColor(char *ColorName, float fac,
int red, int grn, int
void uusleep(unsigned long usecs) {
struct timeval tv;
+ fd_set fds;
tv.tv_sec = usecs / 1000000UL;
tv.tv_usec = usecs % 1000000UL;
- select(1, NULL, NULL, NULL, &tv);
+ FD_ZERO(&fds);
+ FD_SET(x_fd, &fds);
+ select(x_fd + 1, &fds, NULL, NULL, &tv);
}
@@ -385,9 +388,12 @@ void uusleep(unsigned long usecs) {
void short_uusleep(unsigned long usecs) {
struct timeval tv;
+ fd_set fds;
tv.tv_sec = 0;
tv.tv_usec = usecs;
- select(1, NULL, NULL, NULL, &tv);
+ FD_ZERO(&fds);
+ FD_SET(x_fd, &fds);
+ select(x_fd + 1, &fds, NULL, NULL, &tv);
}
--
1.7.11.4
--
To unsubscribe, send mail to [email protected].