From a9b180f774f0592d5a57db41d872e1dabbc938eb Mon Sep 17 00:00:00 2001 From: James Magahern Date: Sun, 7 Jun 2026 00:28:43 -0700 Subject: [PATCH] Keep upcoming frames when trimming queues --- public/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app.js b/public/app.js index e4bbf7b..5525781 100644 --- a/public/app.js +++ b/public/app.js @@ -657,7 +657,7 @@ function trimPendingFrameQueue() { const overflow = state.pendingFrames.length - maxQueuedFrames; if (overflow > 0) { - state.pendingFrames.splice(0, overflow); + state.pendingFrames.splice(maxQueuedFrames, overflow); } } @@ -671,7 +671,7 @@ function trimFrameQueue() { return; } - const removed = state.frames.splice(0, overflow); + const removed = state.frames.splice(maxQueuedFrames, overflow); for (const frame of removed) { releaseImage(frame.bitmap);