shithub: dumb

Download patch

ref: cf2577d4bc284fb5c5b71377413a47c72a1362dc
parent: 89724f7ac8c7b5395df41443c504f7a3c486f144
author: Chris Moeller <kode54@gmail.com>
date: Sun Jun 9 07:22:34 EDT 2013

Fixed timekeeping when starting a sigrenderer with a time offset

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -5745,6 +5745,10 @@
 	while (pos > 0 && pos >= sigrenderer->time_left) {
 		render(sigrenderer, 0, 1.0f, 0, sigrenderer->time_left, NULL);
 
+#ifdef BIT_ARRAY_BULLSHIT
+		sigrenderer->time_played += (LONG_LONG)sigrenderer->time_left << 16;
+#endif
+
 		pos -= sigrenderer->time_left;
 		sigrenderer->time_left = 0;
 
@@ -5756,6 +5760,10 @@
 
 	render(sigrenderer, 0, 1.0f, 0, pos, NULL);
 	sigrenderer->time_left -= pos;
+
+#ifdef BIT_ARRAY_BULLSHIT
+	sigrenderer->time_played += (LONG_LONG)pos << 16;
+#endif
 
 	return sigrenderer;
 }