mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Merge branch 'master' of git://github.com/matricks/teeworlds
This commit is contained in:
commit
82a30b7b7e
2
bam.lua
2
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"))
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue