equal
deleted
inserted
replaced
90 |
90 |
91 _exception_string = strdup(buf); |
91 _exception_string = strdup(buf); |
92 } |
92 } |
93 #endif |
93 #endif |
94 |
94 |
95 void ShowOSErrorBox(const char *buf) |
95 void ShowOSErrorBox(const char *buf, bool system) |
96 { |
96 { |
97 MyShowCursor(true); |
97 MyShowCursor(true); |
98 MessageBox(GetActiveWindow(), MB_TO_WIDE(buf), _T("Error!"), MB_ICONSTOP); |
98 MessageBox(GetActiveWindow(), MB_TO_WIDE(buf), _T("Error!"), MB_ICONSTOP); |
99 |
99 |
100 /* if exception tracker is enabled, we crash here to let the exception handler handle it. */ |
100 /* if exception tracker is enabled, we crash here to let the exception handler handle it. */ |
101 #if defined(WIN32_EXCEPTION_TRACKER) && !defined(_DEBUG) |
101 #if defined(WIN32_EXCEPTION_TRACKER) && !defined(_DEBUG) |
102 if (*buf == '!') { |
102 if (system) { |
103 _exception_string = buf; |
103 _exception_string = buf; |
104 *(byte*)0 = 0; |
104 *(byte*)0 = 0; |
105 } |
105 } |
106 #endif |
106 #endif |
107 } |
107 } |
959 |
959 |
960 #if defined(UNICODE) |
960 #if defined(UNICODE) |
961 |
961 |
962 #if !defined(WINCE) |
962 #if !defined(WINCE) |
963 /* Check if a win9x user started the win32 version */ |
963 /* Check if a win9x user started the win32 version */ |
964 if (HasBit(GetVersion(), 31)) error("This version of OpenTTD doesn't run on windows 95/98/ME.\nPlease download the win9x binary and try again."); |
964 if (HasBit(GetVersion(), 31)) usererror("This version of OpenTTD doesn't run on windows 95/98/ME.\nPlease download the win9x binary and try again."); |
965 #endif |
965 #endif |
966 |
966 |
967 /* For UNICODE we need to convert the commandline to char* _AND_ |
967 /* For UNICODE we need to convert the commandline to char* _AND_ |
968 * save it because argv[] points into this buffer and thus needs to |
968 * save it because argv[] points into this buffer and thus needs to |
969 * be available between subsequent calls to FS2OTTD() */ |
969 * be available between subsequent calls to FS2OTTD() */ |