shithub: pplay

Download patch

ref: e68cc1702b1f63f540deafb5567f7dd347e3fe89
parent: aeba96ede338f336cc19c98c21181b041b785c94
author: qwx <qwx@sciops.net>
date: Wed Feb 15 18:03:24 EST 2023

fix vertical scaling

--- a/draw.c
+++ b/draw.c
@@ -24,7 +24,8 @@
 static Rectangle liner;
 static Point statp;
 static usize views, viewe, viewmax;
-static int bgscalyl, bgscalyr, bgscalf;
+static int bgscalyl, bgscalyr;
+static double bgscalf;
 static Channel *drawc;
 static usize T;
 static int sampwidth = 1;
@@ -344,7 +345,7 @@
 	liner.max.x = x + 1;
 	bgscalyl = (viewr.max.y - font->height) / (stereo ? 4 : 2);
 	bgscalyr = viewr.max.y - bgscalyl;
-	bgscalf = 32767 / bgscalyl;
+	bgscalf = 32767. / bgscalyl;
 }
 
 void