Closed GoogleCodeExporter closed 9 years ago
Seems more logical that the images should be named from 0 to 999 since it is
padding
the index up to 3 digits. This patch should take care of that, but I don't know
the
impact of this when you start approaching 1000 screen shots for a game. It will
be a
lot of fopen for one screen shot.
Index: opengl/screenshot.cpp
===================================================================
--- opengl/screenshot.cpp (revision 1416)
+++ opengl/screenshot.cpp (working copy)
@@ -175,7 +175,7 @@
// look for a file
int i;
- for (i = 0; i < 100; i++)
+ for (i = 0; i < 1000; i++)
{
sprintf(filename, "%s-%03i.png", filepath, i);
FILE *pFile = fopen(filename, "r");
@@ -183,7 +183,7 @@
break;
fclose(pFile);
}
- if (i == 100) return;
+ if (i == 1000) return;
// get the SDL surface and find the width and height
SDL_Surface *pSurf = SDL_GetVideoSurface();
Original comment by olejl77@gmail.com
on 24 Oct 2009 at 10:55
That undoubtedly works just fine, but it doesn't solve the big problem in my
opinion.
Does it really have to try and find the smallest available number every time it
wants to take a screenshot? Is there some way we can keep a static number
attached to
the ROM and just increment off that? I'm assuming that's your concern about
all the
fopens for each shot.
Original comment by hansamu...@gmail.com
on 24 Oct 2009 at 4:07
Original comment by richard...@gmail.com
on 14 Jan 2010 at 5:01
Original comment by richard...@gmail.com
on 20 Jan 2010 at 4:09
This is now fixed in an efficient manner, with support for up to 1000
screenshots per
ROM.
Original comment by richard...@gmail.com
on 27 Jan 2010 at 4:35
Thanks for working on this, great to see the project active!
Original comment by hansamu...@gmail.com
on 27 Jan 2010 at 6:12
Original issue reported on code.google.com by
hansamu...@gmail.com
on 22 Oct 2009 at 4:29