shithub: patch

Download patch

ref: d2ddc3971e891d25a40901db972b93328e086ba1
parent: 239901ce3b6ed358f0e9d6b6c304ffcf070f4113
author: qwx <qwx@sciops.net>
date: Wed Aug 24 21:40:51 EDT 2022

zuke-repeatone: update for tip

--- a/zuke-repeatone
+++ b/zuke-repeatone
@@ -1,7 +1,7 @@
-diff 1fca5f75797af9c8c78d4cd022c41b22040de29a uncommitted
---- a/sys/src/cmd/audio/zuke/zuke.c
-+++ b/sys/src/cmd/audio/zuke/zuke.c
-@@ -90,6 +90,7 @@
+diff a786a79acfc5079761f8b3efe72142640c1e9d2c uncommitted
+--- a//sys/src/cmd/audio/zuke/zuke.c
++++ b//sys/src/cmd/audio/zuke/zuke.c
+@@ -89,6 +89,7 @@
  static char *cols = "AatD";
  static int colspath;
  static int *shuffle;
@@ -9,7 +9,7 @@
  static Rectangle seekbar;
  static int seekmx, newseekmx = -1;
  static double seekoff; /* ms */
-@@ -395,28 +396,32 @@
+@@ -277,28 +278,32 @@
  	if(pcurplaying >= 0){
  		msec = byteswritten*1000/Bps;
  		if(dur > 0){
@@ -47,8 +47,8 @@
 +		snprint(tmp, sizeof(tmp), "%s%s%d%%", repeatone != 0 ? "¹" : "",shuffle != nil ? "∫ " : "", volume);
  	}
  
- 	r = back->r;
-@@ -743,8 +748,14 @@
+ 	lockdisplay(display);
+@@ -726,8 +731,14 @@
  
  	while(1){
  		n = ioread(io, p[1], buf, Relbufsz);
@@ -64,7 +64,7 @@
  
  		thiscover = nil;
  		if(player->img != nil && nbrecv(player->img, &thiscover) != 0){
-@@ -764,6 +775,7 @@
+@@ -747,6 +758,7 @@
  					goto stop;
  			}
  			if(c == Cseekrel){
@@ -72,22 +72,23 @@
  				boffset = MAX(0, boffset + player->seek*Bps);
  				n = 0;
  				break;
-@@ -1170,7 +1182,7 @@
- 	f = display->defaultfont;
+@@ -1185,7 +1197,7 @@
  	Scrollwidth = MAX(14, stringwidth(f, "#"));
  	Scrollheight = MAX(16, f->height);
+ 	Seekthicc = Scrollheight + 2;
 -	Coversz = MAX(64, stringwidth(f, "∫ 00:00:00/00:00:00 100%"));
 +	Coversz = MAX(64, stringwidth(f, "¹∫ 00:00:00/00:00:00 100%"));
  	if((mctl = initmouse(nil, screen)) == nil)
  		sysfatal("initmouse: %r");
  	if((kctl = initkeyboard(nil)) == nil)
-@@ -1372,6 +1384,9 @@
- 			case 's':
- 				toggleshuffle();
+@@ -1400,6 +1412,10 @@
  				recenter();
-+ 				break;
-+ 			case 'r':
-+ 				repeatone ^= 1;
+ 				full = 1;
  				break;
++			case 'r':
++				repeatone ^= 1;
++				redraw(0);
++				continue;
  			case 'c':
  			case 'p':
+ 			case ' ':