shithub: pplay

Download patch

ref: 08d25423206171ba9e5666ed60c57b5e522d6c0c
parent: 845a2a5b5b9772da68585638d6722077c6cd6e58
author: qwx <qwx@sciops.net>
date: Sun Feb 5 11:54:54 EST 2023

draw: fix race in signalling drawn updated waveform

shitty but easier than locks; better solution...?

--- a/draw.c
+++ b/draw.c
@@ -7,6 +7,7 @@
 
 QLock lsync;
 int debugdraw;
+int viewdone;
 
 enum{
 	Cbg,
@@ -28,7 +29,6 @@
 static usize T;
 static int sampwidth = 1;
 static double zoom = 1.0;
-int viewdone;
 
 static Image *
 eallocimage(Rectangle r, int repl, ulong col)
@@ -362,9 +362,9 @@
 	viewe = views + span;
 	if(all)
 		resetdraw();
+	viewdone = 0;
 	unlockdisplay(display);
 	nbsendul(drawc, 1);
-	viewdone = 0;
 }
 
 void