Merge branch 'master' of git://github.com/matricks/teeworlds

This commit is contained in:
Fujnky 2010-06-03 22:42:10 +02:00
commit 82a30b7b7e
2 changed files with 10 additions and 2 deletions

View file

@ -4,7 +4,7 @@ Import("configure.lua")
Import("other/sdl/sdl.lua") Import("other/sdl/sdl.lua")
Import("other/freetype/freetype.lua") Import("other/freetype/freetype.lua")
--- Setup Config -------- --- Setup Config -------
config = NewConfig() config = NewConfig()
config:Add(OptCCompiler("compiler")) config:Add(OptCCompiler("compiler"))
config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all")) config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all"))

View file

@ -27,6 +27,7 @@
#include <engine/keys.h> #include <engine/keys.h>
#include <math.h> #include <math.h>
#include <time.h>
#include "graphics.h" #include "graphics.h"
@ -868,10 +869,17 @@ void CGraphics_SDL::Swap()
char aFilename[128]; char aFilename[128];
static int Index = 1; 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++) for(; Index < 10000; Index++)
{ {
IOHANDLE io; 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); io = m_pStorage->OpenFile(aFilename, IOFLAG_READ);
if(io) if(io)
io_close(io); io_close(io);