ref: 9dd36790c8e5496295d09b520aadccad9e52ae40
parent: 1b36716f0034856c80aa45ebfde74b0649b26186
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Fri Jan 15 15:11:49 EST 2021
fix compilation on 386 and arm
--- a/main.c
+++ b/main.c
@@ -258,19 +258,21 @@
res = alt(a);
switch(res){
case Cframe:
- snprint(
- info, sizeof(info),
- "decode=%-5zd yuv→rgb=%-3zd display=%-3zd total=%-3zd late=%-3zd %dx%d %s %s %s",
- d->decodetime/1000000ULL,
- dispdelay/1000000ULL,
- yuv→rgb/1000000ULL,
- (d->decodetime + dispdelay)/1000000ULL,
- late/1000000ULL,
- frame->w, frame->h,
- d->info,
- d->s->info,
- saudio ? saudio->info : "no audio"
- );
+ if(showinfo){
+ snprint(
+ info, sizeof(info),
+ "decode=%-5lld yuv→rgb=%-3lld display=%-3lld total=%-3lld late=%-3lld %dx%d %s %s %s",
+ d->decodetime/1000000ULL,
+ dispdelay/1000000ULL,
+ yuv→rgb/1000000ULL,
+ (d->decodetime + dispdelay)/1000000ULL,
+ late/1000000ULL,
+ frame->w, frame->h,
+ d->info,
+ d->s->info,
+ saudio ? saudio->info : "no audio"
+ );
+ }
drawframe(frame);
break;
--- a/misc.c
+++ b/misc.c
@@ -44,15 +44,16 @@
return nsec() - xstart;
if(fasthz == 0){
- if((fasthz = _tos->cyclefreq) == 0){
+ fasthz = _tos->cyclefreq;
+ if(fasthz == 0){
fasthz = ~0ULL;
xstart = nsec();
fprint(2, "cyclefreq not available, falling back to nsec()\n");
fprint(2, "you might want to disable aux/timesync\n");
- return 0;
}else{
cycles(&xstart);
}
+ return 0;
}
cycles(&x);
x -= xstart;