fix shadowed variable name and screenshot file name length
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7646 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: a2893abff960f9f46a55b126a949b29b215843d8 Former-commit-id: 118af33ecb4b390f136dd47fb0f635b5fb10a61e
This commit is contained in:
parent
354a13dd43
commit
c37306fbc2
1 changed files with 4 additions and 4 deletions
|
@ -1165,7 +1165,7 @@ GfuiSetKeyAutoRepeat(void *scr, int on)
|
|||
void
|
||||
GfuiScreenShot(void * /* notused */)
|
||||
{
|
||||
char path[256];
|
||||
char path[1024];
|
||||
snprintf(path, sizeof(path), "%sscreenshots", GfLocalDir());
|
||||
|
||||
// Ensure that screenshot directory exists.
|
||||
|
@ -1173,8 +1173,8 @@ GfuiScreenShot(void * /* notused */)
|
|||
{
|
||||
time_t t = time(NULL);
|
||||
struct tm *stm = localtime(&t);
|
||||
char buf[sizeof(path)+64];
|
||||
snprintf(buf, sizeof(buf), "%s/sd-%4d%02d%02d%02d%02d%02d.png",
|
||||
char png[sizeof(path)];
|
||||
snprintf(png, sizeof(png), "%s/sd-%4d%02d%02d%02d%02d%02d.png",
|
||||
path,
|
||||
stm->tm_year+1900,
|
||||
stm->tm_mon+1,
|
||||
|
@ -1182,7 +1182,7 @@ GfuiScreenShot(void * /* notused */)
|
|||
stm->tm_hour,
|
||||
stm->tm_min,
|
||||
stm->tm_sec);
|
||||
GfScrCaptureAsPNG(buf);
|
||||
GfScrCaptureAsPNG(png);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue