Xinqi Bao's Git
projects
/
st.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
(from parent 1:
297c886
)
Merge remote-tracking branch 'origin/master' into omaster
author
Roberto E. Vargas Caballero <
[email protected]
>
Mon, 28 Oct 2013 18:18:24 +0000
(19:18 +0100)
committer
Roberto E. Vargas Caballero <
[email protected]
>
Mon, 28 Oct 2013 18:18:24 +0000
(19:18 +0100)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
12e1e1f
..
8cfa2f7
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-3686,6
+3686,8
@@
run(void) {
gettimeofday(&last, NULL);
for(xev = actionfps;;) {
+ long deltatime;
+
FD_ZERO(&rfd);
FD_SET(cmdfd, &rfd);
FD_SET(xfd, &rfd);
@@
-3719,8
+3721,9
@@
run(void) {
gettimeofday(&lastblink, NULL);
dodraw = 1;
}
- if(TIMEDIFF(now, last) \
- > (xev? (1000/xfps) : (1000/actionfps))) {
+ deltatime = TIMEDIFF(now, last);
+ if(deltatime > (xev? (1000/xfps) : (1000/actionfps))
+ || deltatime < 0) {
dodraw = 1;
last = now;
}