diff options
| author | oy <Tom_Adams@web.de> | 2010-12-08 00:32:50 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-12-08 00:32:50 +0100 |
| commit | 665934ee098abca1c7b585476502462b94b1bdc8 (patch) | |
| tree | 657538cbb3457d66e4605f148d99b8d6bb09358e /src/game/client/components/menus_ingame.cpp | |
| parent | 9ef5e64916deb3faae1fdee2f1be6f4b7f33f1f8 (diff) | |
| download | zcatch-665934ee098abca1c7b585476502462b94b1bdc8.tar.gz zcatch-665934ee098abca1c7b585476502462b94b1bdc8.zip | |
cleaned up several uses of timestamps for filenames
Diffstat (limited to 'src/game/client/components/menus_ingame.cpp')
| -rw-r--r-- | src/game/client/components/menus_ingame.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game/client/components/menus_ingame.cpp b/src/game/client/components/menus_ingame.cpp index 75292249..14a19f12 100644 --- a/src/game/client/components/menus_ingame.cpp +++ b/src/game/client/components/menus_ingame.cpp @@ -1,7 +1,5 @@ /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ -#include <time.h> - #include <base/math.h> #include <engine/demo.h> @@ -103,10 +101,10 @@ void CMenus::RenderGame(CUIRect MainView) if(!Recording) { char aFilename[128]; - time_t Time; - time(&Time); - tm* TimeInfo = localtime(&Time); - strftime(aFilename, sizeof(aFilename), "demo-%Y-%m-%d_%H-%M-%S", TimeInfo); + char aDate[20]; + + str_timestamp(aDate, sizeof(aDate)); + str_format(aFilename, sizeof(aFilename), "demo_%s.png", aDate); Client()->DemoRecorder_Start(aFilename); } else |