From c75a75b64ff804e7a14374e17b31377aabff0d63 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 12 Dec 2010 16:48:13 +0100 Subject: made it possible to automatically take game over screenshots. Closes #339 --- src/engine/shared/config_variables.h | 2 ++ src/engine/shared/storage.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/engine/shared') diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index b34e733b..ad84da0d 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -19,6 +19,8 @@ MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "") MACRO_CONFIG_INT(ClAutoDemoRecord, cl_auto_demo_record, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically record demos") MACRO_CONFIG_INT(ClAutoDemoMax, cl_auto_demo_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically recorded demos (0 = no limit)") +MACRO_CONFIG_INT(ClAutoScreenshot, cl_auto_screenshot, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically take game over screenshot") +MACRO_CONFIG_INT(ClAutoScreenshotMax, cl_auto_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created screenshots (0 = no limit)") MACRO_CONFIG_INT(ClEventthread, cl_eventthread, 0, 0, 1, CFGFLAG_CLIENT, "Enables the usage of a thread to pump the events") diff --git a/src/engine/shared/storage.cpp b/src/engine/shared/storage.cpp index d19be8a8..ffbd3aff 100644 --- a/src/engine/shared/storage.cpp +++ b/src/engine/shared/storage.cpp @@ -57,10 +57,12 @@ public: { char aPath[MAX_PATH_LENGTH]; fs_makedir(GetPath(TYPE_SAVE, "screenshots", aPath, sizeof(aPath))); + fs_makedir(GetPath(TYPE_SAVE, "screenshots/auto", aPath, sizeof(aPath))); fs_makedir(GetPath(TYPE_SAVE, "maps", aPath, sizeof(aPath))); fs_makedir(GetPath(TYPE_SAVE, "dumps", aPath, sizeof(aPath))); fs_makedir(GetPath(TYPE_SAVE, "downloadedmaps", aPath, sizeof(aPath))); fs_makedir(GetPath(TYPE_SAVE, "demos", aPath, sizeof(aPath))); + fs_makedir(GetPath(TYPE_SAVE, "demos/auto", aPath, sizeof(aPath))); } return m_NumPaths ? 0 : 1; -- cgit 1.4.1