win32.c
changeset 4236 8f21cc1d7095
parent 4224 72c4669d95fa
child 4245 e8d08dbda199
equal deleted inserted replaced
4235:f5ad8ebce258 4236:8f21cc1d7095
    22 #include <sys/types.h>
    22 #include <sys/types.h>
    23 #include <sys/stat.h>
    23 #include <sys/stat.h>
    24 
    24 
    25 static bool _has_console;
    25 static bool _has_console;
    26 
    26 
    27 #if defined(__MINGW32__) || defined(__CYGWIN__)
       
    28 	#define __TIMESTAMP__   __DATE__ __TIME__
       
    29 #endif
       
    30 
       
    31 #if defined(__MINGW32__)
    27 #if defined(__MINGW32__)
    32 	#include <stdint.h>
    28 	#include <stdint.h>
    33 #endif
    29 #endif
    34 
    30 
    35 static bool cursor_visible = true;
    31 static bool cursor_visible = true;
   438 	_crash_msg = output = LocalAlloc(LMEM_FIXED, 8192);
   434 	_crash_msg = output = LocalAlloc(LMEM_FIXED, 8192);
   439 
   435 
   440 	{
   436 	{
   441 		SYSTEMTIME time;
   437 		SYSTEMTIME time;
   442 		GetLocalTime(&time);
   438 		GetLocalTime(&time);
   443 		output += sprintf(output,
   439 		output += snprintf(output, 8192,
   444 			"*** OpenTTD Crash Report ***\r\n"
   440 			"*** OpenTTD Crash Report ***\r\n"
   445 			"Date: %d-%.2d-%.2d %.2d:%.2d:%.2d\r\n"
   441 			"Date: %d-%.2d-%.2d %.2d:%.2d:%.2d\r\n"
   446 			"Build: %s built on " __TIMESTAMP__ "\r\n",
   442 			"Build: %s built on " __DATE__ " " __TIME__ "\r\n",
   447 			time.wYear,
   443 			time.wYear,
   448 			time.wMonth,
   444 			time.wMonth,
   449 			time.wDay,
   445 			time.wDay,
   450 			time.wHour,
   446 			time.wHour,
   451 			time.wMinute,
   447 			time.wMinute,