aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Vargas Caballero2013-10-28 19:18:24 +0100
committerRoberto E. Vargas Caballero2013-10-28 19:18:24 +0100
commit9b6cddd45eb4b5e82be3584a298e8b19c7f8e303 (patch)
tree2d0405776cbe32554039cb00378c82a787385691
parent4d4b871491688f0f9b331d5ddd7f2511bcb29ab7 (diff)
parentd5601246c7dc693c45242de09911fc5698aa3340 (diff)
downloadaur-9b6cddd45eb4b5e82be3584a298e8b19c7f8e303.tar.gz
Merge remote-tracking branch 'origin/master' into omaster
-rw-r--r--st.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/st.c b/st.c
index 12e1e1f1e5ca..8cfa2f7ba40a 100644
--- 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;
}