mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix #6776: Screenshots do not get stored in screenshot folder
This commit is contained in:
@@ -103,7 +103,15 @@ static sint32 screenshot_get_next_path(char *path, size_t size)
|
||||
#endif
|
||||
|
||||
// Glue together path and filename
|
||||
snprintf(path, size, "%s%s %d-%02d-%02d %02d-%02d-%02d.png", screenshotPath, park_name, currentDate.year, currentDate.month, currentDate.day, currentTime.hour, currentTime.minute, currentTime.second);
|
||||
safe_strcpy(path, screenshotPath, size);
|
||||
path_end_with_separator(path, size);
|
||||
auto fileNameCh = strchr(path, '\0');
|
||||
if (fileNameCh == nullptr)
|
||||
{
|
||||
log_error("Unable to generate a screenshot filename.");
|
||||
return -1;
|
||||
}
|
||||
snprintf(fileNameCh, size - strlen(path), "%s %d-%02d-%02d %02d-%02d-%02d.png", park_name, currentDate.year, currentDate.month, currentDate.day, currentTime.hour, currentTime.minute, currentTime.second);
|
||||
|
||||
if (!platform_file_exists(path)) {
|
||||
return 0; // path ok
|
||||
|
||||
Reference in New Issue
Block a user