mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 02:14:09 +03:00
Save screenshots with proper filenames
Filenames are timestamped now, down to the second. If you take multiple screenshots in the same second, then the last one will overwrite the others. This seems to be how other screenshot programs operate so I don't think it matters if you can't take more than one per second. Additionally, 1x screenshots (320x240) will go in the 1x/ subdirectory, and 2x screenshots (640x480) will go in the 2x/ subdirectory.
This commit is contained in:
@@ -270,6 +270,19 @@ int FILESYSTEM_init(char *argvZero, char* baseDir, char *assetsPath, char* langD
|
||||
mkdir(screenshotDir, 0777);
|
||||
vlog_info("Screenshot directory: %s", screenshotDir);
|
||||
|
||||
/* We also need to make the subdirectories */
|
||||
{
|
||||
char temp[MAX_PATH];
|
||||
SDL_snprintf(temp, sizeof(temp), "%s%s%s",
|
||||
screenshotDir, "1x", pathSep
|
||||
);
|
||||
mkdir(temp, 0777);
|
||||
SDL_snprintf(temp, sizeof(temp), "%s%s%s",
|
||||
screenshotDir, "2x", pathSep
|
||||
);
|
||||
mkdir(temp, 0777);
|
||||
}
|
||||
|
||||
basePath = SDL_GetBasePath();
|
||||
|
||||
if (basePath == NULL)
|
||||
|
||||
Reference in New Issue
Block a user