X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=c67619de7d5270cb3cc99a821af597c8a6e0f67b;hb=5528280fae23968ffd3cf0527881cabddc24cf85;hp=bf5b675487b2be4c0b11807df804417ab2e7947f;hpb=6ee56d65906362f3f6ade570da0ce9c28788eaf5;p=st.git diff --git a/st.c b/st.c index bf5b675..c67619d 100644 --- a/st.c +++ b/st.c @@ -2504,7 +2504,6 @@ tstrsequence(uchar c) { strreset(); strescseq.type = c; term.esc |= ESC_STR; - return; } void @@ -2586,7 +2585,6 @@ tcontrolcode(uchar ascii) { } /* only CAN, SUB, \a and C1 chars interrupt a sequence */ term.esc &= ~(ESC_STR_END|ESC_STR); - return; } /* @@ -3992,7 +3990,7 @@ run(void) { clock_gettime(CLOCK_MONOTONIC, &now); drawtimeout.tv_sec = 0; - drawtimeout.tv_nsec = (1000/xfps) * 1E6; + drawtimeout.tv_nsec = (1000 * 1E6)/ xfps; tv = &drawtimeout; dodraw = 0; @@ -4003,8 +4001,7 @@ run(void) { dodraw = 1; } deltatime = TIMEDIFF(now, last); - if(deltatime > (xev? (1000/xfps) : (1000/actionfps)) - || deltatime < 0) { + if(deltatime > 1000 / (xev ? xfps : actionfps)) { dodraw = 1; last = now; }