commit 0a2e158e737121ba4906a687c13214e4b090bd08
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Oct 22 17:12:39 2006 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Sun Oct 22 17:12:39 2006 +0000
Catch failure to initialise video when calling SDL_Init.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 709
---
src/i_video.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/i_video.c b/src/i_video.c
index 02b0b62e..c45d3640 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1034,7 +1034,10 @@ void I_InitGraphics(void)
SDL_Event dummy;
int flags = 0;
- SDL_Init(SDL_INIT_VIDEO);
+ if (SDL_Init(SDL_INIT_VIDEO) < 0)
+ {
+ I_Error("Failed to initialise video: %s", SDL_GetError());
+ }
// Check for command-line video-related parameters.