summaryrefslogtreecommitdiff
path: root/src/screenshot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r--src/screenshot.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index f667ecf2f..ced474d91 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -17,7 +17,7 @@
#include "core/alloc_func.hpp"
#include "core/endian_func.hpp"
#include "map_func.h"
-#include "date_func.h"
+#include "saveload.h"
#include "company_func.h"
#include "table/strings.h"
@@ -550,13 +550,10 @@ static char *MakeScreenshotName(const char *ext)
if (_game_mode == GM_EDITOR || _game_mode == GM_MENU || _local_company == COMPANY_SPECTATOR) {
strecpy(_screenshot_name, "screenshot", lastof(_screenshot_name));
} else {
- SetDParam(0, _local_company);
- SetDParam(1, _date);
- GetString(_screenshot_name, STR_4004, lastof(_screenshot_name));
+ GenerateDefaultSaveName(_screenshot_name, lastof(_screenshot_name));
}
/* Add extension to screenshot file */
- SanitizeFilename(_screenshot_name);
len = strlen(_screenshot_name);
snprintf(&_screenshot_name[len], lengthof(_screenshot_name) - len, ".%s", ext);
@@ -619,6 +616,3 @@ bool MakeScreenshot()
default: return false;
}
}
-
-
-