Don't overwrite old gifs

This commit is contained in:
Mustafa Furkan Bulut 2025-09-15 20:45:50 +03:00
parent ed8f1a22d1
commit 2541ed0c66

View File

@ -1012,7 +1012,14 @@ void EndDrawing(void)
Vector2 scale = GetWindowScaleDPI();
msf_gif_begin(&gifState, (int)((float)CORE.Window.render.width*scale.x), (int)((float)CORE.Window.render.height*scale.y));
for (int i = 0; i <= 999; i++)
{
if (!FileExists(TextFormat("%s/screenrec%03i.gif", CORE.Storage.basePath, screenshotCounter)))
break;
screenshotCounter++;
}
TRACELOG(LOG_INFO, "SYSTEM: Start animated GIF recording: %s", TextFormat("screenrec%03i.gif", screenshotCounter));
}