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 /src/engine/client/graphics.cpp | |
| parent | 4ffab2af80199f36902cd276e3485da216c480e4 (diff) | |
| parent | a48fa5faf26ca53cad9044a7826d3b2b62c24f06 (diff) | |
| download | zcatch-82a30b7b7ee55d6138b06ce0f35502be5bd27e23.tar.gz zcatch-82a30b7b7ee55d6138b06ce0f35502be5bd27e23.zip | |
Merge branch 'master' of git://github.com/matricks/teeworlds
Diffstat (limited to 'src/engine/client/graphics.cpp')
| -rw-r--r-- | src/engine/client/graphics.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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); |