summaryrefslogtreecommitdiff
path: root/src/video/sdl_v.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-06-05 20:54:52 +0000
committerglx <glx@openttd.org>2008-06-05 20:54:52 +0000
commitee256e770afb5f04a6a10f3b2045dd426d3167ff (patch)
tree62bef57de81c1ddcc691d5de5e8db395615bdacc /src/video/sdl_v.cpp
parent5176319dd5145138604dd48c44b056693d900b10 (diff)
downloadopenttd-ee256e770afb5f04a6a10f3b2045dd426d3167ff.tar.xz
(svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror().
Diffstat (limited to 'src/video/sdl_v.cpp')
-rw-r--r--src/video/sdl_v.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 9872c14cf..869a53ce1 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -118,7 +118,7 @@ static void GetVideoModes()
modes = SDL_CALL SDL_ListModes(NULL, SDL_SWSURFACE + (_fullscreen ? SDL_FULLSCREEN : 0));
if (modes == NULL)
- error("sdl: no modes available");
+ usererror("sdl: no modes available");
_all_modes = (modes == (void*)-1);
@@ -198,7 +198,7 @@ static bool CreateMainSurface(int w, int h)
DEBUG(driver, 1, "SDL: using mode %dx%dx%d", w, h, bpp);
- if (bpp == 0) error("Can't use a blitter that blits 0 bpp for normal visuals");
+ if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");
/* Give the application an icon */
icon = SDL_CALL SDL_LoadBMP(ICON_DIR PATHSEP "openttd.32.bmp");