From 665934ee098abca1c7b585476502462b94b1bdc8 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 8 Dec 2010 00:32:50 +0100 Subject: cleaned up several uses of timestamps for filenames --- src/game/client/components/menus_ingame.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/game/client/components/menus_ingame.cpp') 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 - #include #include @@ -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 -- cgit 1.4.1