From a563c2f322bb62437149552ab17f965c9922daf6 Mon Sep 17 00:00:00 2001 From: xalduin Date: Thu, 3 Jun 2010 16:24:31 -0400 Subject: Issue #82 time and date in screenshot filename --- src/engine/client/graphics.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp index 667ba213..e2f4ae4c 100644 --- a/src/engine/client/graphics.cpp +++ b/src/engine/client/graphics.cpp @@ -27,6 +27,7 @@ #include #include +#include #include "graphics.h" @@ -868,10 +869,17 @@ void CGraphics_SDL::Swap() char aFilename[128]; static int Index = 1; + time_t Time; + char aDate[20]; + + time(&Time); + tm* TimeInfo = localtime(&Time); + strftime(aDate, sizeof(aDate), "%Y-%m-%d_%I-%M", TimeInfo); + for(; Index < 10000; Index++) { IOHANDLE io; - str_format(aFilename, sizeof(aFilename), "screenshots/screenshot%05d.png", Index); + str_format(aFilename, sizeof(aFilename), "screenshots/screenshot%s-%05d.png", aDate, Index); io = m_pStorage->OpenFile(aFilename, IOFLAG_READ); if(io) io_close(io); -- cgit 1.4.1 From a48fa5faf26ca53cad9044a7826d3b2b62c24f06 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 3 Jun 2010 22:39:40 +0200 Subject: phony commit to test --- bam.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bam.lua b/bam.lua index 75f46316..6891894b 100644 --- a/bam.lua +++ b/bam.lua @@ -4,7 +4,7 @@ Import("configure.lua") Import("other/sdl/sdl.lua") Import("other/freetype/freetype.lua") ---- Setup Config -------- +--- Setup Config ------- config = NewConfig() config:Add(OptCCompiler("compiler")) config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all")) -- cgit 1.4.1