diff options
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -3686,6 +3686,8 @@ run(void) { | |||
| 3686 | gettimeofday(&last, NULL); | 3686 | gettimeofday(&last, NULL); |
| 3687 | 3687 | ||
| 3688 | for(xev = actionfps;;) { | 3688 | for(xev = actionfps;;) { |
| 3689 | long deltatime; | ||
| 3690 | |||
| 3689 | FD_ZERO(&rfd); | 3691 | FD_ZERO(&rfd); |
| 3690 | FD_SET(cmdfd, &rfd); | 3692 | FD_SET(cmdfd, &rfd); |
| 3691 | FD_SET(xfd, &rfd); | 3693 | FD_SET(xfd, &rfd); |
| @@ -3719,8 +3721,9 @@ run(void) { | |||
| 3719 | gettimeofday(&lastblink, NULL); | 3721 | gettimeofday(&lastblink, NULL); |
| 3720 | dodraw = 1; | 3722 | dodraw = 1; |
| 3721 | } | 3723 | } |
| 3722 | if(TIMEDIFF(now, last) \ | 3724 | deltatime = TIMEDIFF(now, last); |
| 3723 | > (xev? (1000/xfps) : (1000/actionfps))) { | 3725 | if(deltatime > (xev? (1000/xfps) : (1000/actionfps)) |
| 3726 | || deltatime < 0) { | ||
| 3724 | dodraw = 1; | 3727 | dodraw = 1; |
| 3725 | last = now; | 3728 | last = now; |
| 3726 | } | 3729 | } |
