Fixed some little problems with the windows version
This commit is contained in:
@@ -131,10 +131,11 @@ char *generate_filename(void)
|
|||||||
extern char fnames;
|
extern char fnames;
|
||||||
char *filename;
|
char *filename;
|
||||||
char *tmp = &fnames;
|
char *tmp = &fnames;
|
||||||
struct stat buf;
|
|
||||||
short i=0;
|
short i=0;
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
SYSTEMTIME time;
|
SYSTEMTIME time;
|
||||||
|
#else
|
||||||
|
struct stat buf;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MSDOS__
|
#ifdef __MSDOS__
|
||||||
@@ -162,7 +163,7 @@ char *generate_filename(void)
|
|||||||
filename = (char *)malloc(strlen(tmp)+6);
|
filename = (char *)malloc(strlen(tmp)+6);
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
filename = (char *)malloc(strlen(tmp)+36);
|
filename = (char *)malloc(strlen(tmp)+25);
|
||||||
#endif
|
#endif
|
||||||
strcpy(filename, tmp);
|
strcpy(filename, tmp);
|
||||||
tmp = filename;
|
tmp = filename;
|
||||||
@@ -173,7 +174,7 @@ char *generate_filename(void)
|
|||||||
GetLocalTime(&time);
|
GetLocalTime(&time);
|
||||||
|
|
||||||
/*make filename from local time*/
|
/*make filename from local time*/
|
||||||
wsprintf(tmp," %d_%02d_%02d_%02d-%02d-%02d-ScreenShot.png\0", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond);
|
wsprintf(tmp," %d_%02d_%02d_%02d-%02d-%02d.png\0", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond);
|
||||||
#endif
|
#endif
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
/*find first unused file*/
|
/*find first unused file*/
|
||||||
|
|||||||
Reference in New Issue
Block a user