Global: prevents ascii logo from being overwritten in --dynamic-interval mode

This commit is contained in:
Carter Li
2026-06-05 14:46:27 +08:00
parent ba3968784f
commit 6b9f594620
+3 -1
View File
@@ -765,9 +765,11 @@ static void run(FFdata* data) {
}
if (instance.state.dynamicInterval > 0) {
ffLogoPrintRemaining(); // `logoLineCacheClear` inside so that ffLogoPrintLine will use `\e[nC` to move the cursor to the right position instead of reprinting the logo
fputs("\e[J", stdout); // Clear from cursor to the end of the screen to prevent artifacts when the new output is shorter than the previous one
fflush(stdout);
ffTimeSleep(instance.state.dynamicInterval);
fputs("\e[H", stdout);
fputs("\e[H", stdout); // Move cursor to the top left corner to overwrite the previous output
} else {
break;
}