commit ba4e556f91026c4625fcfeebe62d7cca0fe0c9e2
parent a86b3378b2f70d940cc03c43ee0078a5245ac0ff
Author: Pavel Renev <an2qzavok@gmail.com>
Date: Sun, 15 Nov 2020 20:10:12 +0000
check for file arg on start
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/amp.c b/amp.c
@@ -58,9 +58,10 @@ threadmain(int argc, char **argv)
ARGBEGIN{
default:
usage();
- break;
}ARGEND;
+ if (argc == 0) usage();
+
loadpcm(argv[0]);
mono8 = mkmono8(pcm, pcmlen);
@@ -163,7 +164,7 @@ resize(void)
rbars.min.x += 4;
rbars.max.x -= 4;
height = Dy(screen->r) / (DHEIGHT + 4) * (DHEIGHT + 4);
- rbars.min.y += (Dy(screen->r) - height) / 2;
+ rbars.min.y += 2 + (Dy(screen->r) - height) / 2;
rbars.max.y = rbars.min.y + height;
if (scroll > pcmlen/(4 * ZOOMOUT*dwidth))
@@ -420,4 +421,5 @@ drawscroll(int ds)
p.y += DHEIGHT + 4;
pos += dwidth;
}
+ drawcurabs();
}
\ No newline at end of file