diff options
author | michi_cc <michi_cc@openttd.org> | 2011-11-04 23:47:00 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-11-04 23:47:00 +0000 |
commit | 6a2735d24ed54158b93eac217e803dcd89f67a9e (patch) | |
tree | 944963598eb052eeb378dae91d78f4dabca83848 /src/video | |
parent | 65d0d19b1616e5867afdf9d9f1c68972d2c3f2b0 (diff) | |
download | openttd-6a2735d24ed54158b93eac217e803dcd89f67a9e.tar.xz |
(svn r23119) -Fix: [Win32] Don't show a crash/assertion message box for a GUI-less video driver.
Diffstat (limited to 'src/video')
-rw-r--r-- | src/video/dedicated_v.cpp | 5 | ||||
-rw-r--r-- | src/video/null_v.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index d5f63d818..8a3be5bd6 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -163,6 +163,11 @@ const char *VideoDriver_Dedicated::Start(const char * const *parm) 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(); diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index 6b4aa1c66..6fdb87648 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -19,6 +19,11 @@ static FVideoDriver_Null iFVideoDriver_Null; 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; |