mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08: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/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"))
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue