Changeset - r18273:a81ce039c1e9
[Not reviewed]
master
0 3 0
michi_cc - 13 years ago 2011-11-04 23:47:00
michi_cc@openttd.org
(svn r23119) -Fix: [Win32] Don't show a crash/assertion message box for a GUI-less video driver.
3 files changed with 12 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/os/windows/crashlog_win.cpp
Show inline comments
 
@@ -25,6 +25,7 @@
 
#include "../../strings_func.h"
 
#include "../../gamelog.h"
 
#include "../../saveload/saveload.h"
 
#include "../../video/video_driver.hpp"
 

	
 
#include <windows.h>
 
#include <signal.h>
 
@@ -526,7 +527,7 @@ static LONG WINAPI ExceptionHandler(EXCE
 
	/* Close any possible log files */
 
	CloseConsoleLogIfActive();
 

	
 
	if (_safe_esp != NULL) {
 
	if ((_video_driver == NULL || _video_driver->HasGUI()) && _safe_esp != NULL) {
 
#ifdef _M_AMD64
 
		ep->ContextRecord->Rip = (DWORD64)ShowCrashlogWindow;
 
		ep->ContextRecord->Rsp = (DWORD64)_safe_esp;
src/video/dedicated_v.cpp
Show inline comments
 
@@ -163,6 +163,11 @@ const char *VideoDriver_Dedicated::Start
 
	SetConsoleTitle(_T("OpenTTD Dedicated Server"));
 
#endif
 

	
 
#ifdef _MSC_VER
 
	/* Disable the MSVC assertion message box. */
 
	_set_error_mode(_OUT_TO_STDERR);
 
#endif
 

	
 
#ifdef __OS2__
 
	/* For OS/2 we also need to switch to console mode instead of PM mode */
 
	OS2_SwitchToConsoleMode();
src/video/null_v.cpp
Show inline comments
 
@@ -19,6 +19,11 @@ static FVideoDriver_Null iFVideoDriver_N
 

	
 
const char *VideoDriver_Null::Start(const char * const *parm)
 
{
 
#ifdef _MSC_VER
 
	/* Disable the MSVC assertion message box. */
 
	_set_error_mode(_OUT_TO_STDERR);
 
#endif
 

	
 
	this->ticks = GetDriverParamInt(parm, "ticks", 1000);
 
	_screen.width  = _screen.pitch = _cur_resolution.width;
 
	_screen.height = _cur_resolution.height;
0 comments (0 inline, 0 general)