diff src/video/win32/SDL_win32video.c @ 3521:76f9b76ddf0f

Don't add any renderers if you can't add any displays
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Dec 2009 09:01:48 +0000
parents 6338b7f2d024
children 59ff7a2beb57
line wrap: on
line diff
--- a/src/video/win32/SDL_win32video.c	Fri Dec 04 08:45:08 2009 +0000
+++ b/src/video/win32/SDL_win32video.c	Fri Dec 04 09:01:48 2009 +0000
@@ -207,7 +207,9 @@
 int
 WIN_VideoInit(_THIS)
 {
-    WIN_InitModes(_this);
+    if (WIN_InitModes(_this) < 0) {
+        return -1;
+    }
 
 #if SDL_VIDEO_RENDER_D3D
     D3D_AddRenderDriver(_this);