--- a/src/video/x11/SDL_x11modes.c Fri Dec 04 08:45:08 2009 +0000
+++ b/src/video/x11/SDL_x11modes.c Fri Dec 04 09:01:48 2009 +0000
@@ -118,7 +118,7 @@
return SDL_PIXELFORMAT_UNKNOWN;
}
-void
+int
X11_InitModes(_THIS)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
@@ -168,6 +168,11 @@
display.driverdata = displaydata;
SDL_AddVideoDisplay(&display);
}
+ if (_this->num_displays == 0) {
+ SDL_SetError("No available displays");
+ return -1;
+ }
+ return 0;
}
/* Global for the error handler */