diff options
| author | Fujnky <larsfunke1996@gmail.com> | 2010-06-03 22:42:10 +0200 |
|---|---|---|
| committer | Fujnky <larsfunke1996@gmail.com> | 2010-06-03 22:42:10 +0200 |
| commit | 82a30b7b7ee55d6138b06ce0f35502be5bd27e23 (patch) | |
| tree | 151b54d3e84ae3d32b0b7c19cab2ea84bb4f6103 | |
| parent | 4ffab2af80199f36902cd276e3485da216c480e4 (diff) | |
| parent | a48fa5faf26ca53cad9044a7826d3b2b62c24f06 (diff) | |
| download | zcatch-82a30b7b7ee55d6138b06ce0f35502be5bd27e23.tar.gz zcatch-82a30b7b7ee55d6138b06ce0f35502be5bd27e23.zip | |
Merge branch 'master' of git://github.com/matricks/teeworlds
| -rw-r--r-- | bam.lua | 2 | ||||
| -rw-r--r-- | src/engine/client/graphics.cpp | 10 |
2 files changed, 10 insertions, 2 deletions
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")) 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 <engine/keys.h> #include <math.h> +#include <time.h> #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); |