diff options
author | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2013-10-28 19:18:24 +0100 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2013-10-28 19:18:24 +0100 |
commit | 3d3c37bc70042cd2f4bbc8f6ea5fceb2311f0a32 (patch) | |
tree | 88478e9071eed37ac3233c0857097dcbdfd6a0c7 /st.c | |
parent | 297c886b72f4e9093973aaa14b66d392f6196634 (diff) | |
parent | 489982d4b8442af25a380f8c22be542055cda81f (diff) |
Merge remote-tracking branch 'origin/master' into omaster
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; } |