Showing the changes to plan9.c (1 of 1 file). Show all
Unified · Split
| @@ -74,7 +74,7 @@ static Channel *cchan; · 73 unmodified lines | |||
| 74 | static Field copyfield; | 74 | static Field copyfield; |
| 75 | static int altdown; | 75 | static int altdown; |
| 76 | static int mode = Minsert; | 76 | static int mode = Minsert; |
| 77 | static long framedev; /* frame deviation >= 1µs */ | 77 | static long framedev; /* frame deviation >= 1ms */ |
| 78 | 78 | ||
| 79 | static char *style[Numstyles] = { | 79 | static char *style[Numstyles] = { |
| 80 | [Sfancy] = "fancy", | 80 | [Sfancy] = "fancy", |
| @@ -282,7 +282,7 @@ orcathread(void *drawchan) · 201 unmodified lines | |||
| 282 | oldbpm = bpm; | 282 | oldbpm = bpm; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | /* doesn't suppose to jump back, but just in case do _something_ */ | 285 | /* not supposed to jump back, but just in case, do _something_ */ |
| 286 | if (n < oldn) | 286 | if (n < oldn) |
| 287 | end -= oldn - n; | 287 | end -= oldn - n; |
| 288 | 288 | ||
| @@ -295,7 +295,7 @@ orcathread(void *drawchan) · 6 unmodified lines | |||
| 295 | sleep(1); | 295 | sleep(1); |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | framedev = (processnew - processold - 15000000000LL/bpm) / 1000LL; | 298 | framedev = labs(processnew/1000LL - processold/1000LL)/1000L - 15000L/bpm; |
| 299 | tick++; | 299 | tick++; |
| 300 | } | 300 | } |
| 301 | } | 301 | } |
| @@ -425,7 +425,7 @@ redraw(void) · 123 unmodified lines | |||
| 425 | /* frame deviation */ | 425 | /* frame deviation */ |
| 426 | p.y -= font->height; | 426 | p.y -= font->height; |
| 427 | p.x += charw * (len + Coloff); | 427 | p.x += charw * (len + Coloff); |
| 428 | len = MAX(6, runesprint(linebuf, "%ldµs", labs(framedev))); | 428 | len = MAX(6, runesprint(linebuf, "%ldms", labs(framedev))); |
| 429 | runestring(screen, p, color[Dfhigh], ZP, font, linebuf); | 429 | runestring(screen, p, color[Dfhigh], ZP, font, linebuf); |
| 430 | 430 | ||
| 431 | USED(len); | 431 | USED(len); |
| @@ -694,7 +694,7 @@ threadmain(int argc, char **argv) · 262 unmodified lines | |||
| 694 | a[Ckey].c = kchan; | 694 | a[Ckey].c = kchan; |
| 695 | a[Cmouse].c = mctl->c; | 695 | a[Cmouse].c = mctl->c; |
| 696 | a[Cresize].c = mctl->resizec; | 696 | a[Cresize].c = mctl->resizec; |
| 697 | a[Credraw].c = chancreate(sizeof(ulong), 1); | 697 | a[Credraw].c = chancreate(sizeof(ulong), 0); |
| 698 | 698 | ||
| 699 | for (n = 0; n < Numcolors; n++) | 699 | for (n = 0; n < Numcolors; n++) |
| 700 | color[n] = allocimage(display, Rect(0, 0, 1, 1), RGBA32, 1, setalpha(theme[n] & ~0xff, theme[n] & 0xff)); | 700 | color[n] = allocimage(display, Rect(0, 0, 1, 1), RGBA32, 1, setalpha(theme[n] & ~0xff, theme[n] & 0xff)); |