diff src/video/x11/SDL_x11render.c @ 3520:83518f8fcd61

Fixed calls to SDL_AddRenderDriver()
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Dec 2009 08:45:08 +0000
parents ab5aebd50add
children a1896642a47e
line wrap: on
line diff
--- a/src/video/x11/SDL_x11render.c	Fri Dec 04 08:26:32 2009 +0000
+++ b/src/video/x11/SDL_x11render.c	Fri Dec 04 08:45:08 2009 +0000
@@ -144,6 +144,7 @@
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
     SDL_RendererInfo *info = &X11_RenderDriver.info;
     SDL_DisplayMode *mode = &SDL_CurrentDisplay.desktop_mode;
+    int i;
 
     info->texture_formats[info->num_texture_formats++] = mode->format;
     info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_YV12;
@@ -152,7 +153,9 @@
     info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_UYVY;
     info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_YVYU;
 
-    SDL_AddRenderDriver(0, &X11_RenderDriver);
+    for (i = 0; i < _this->num_displays; ++i) {
+        SDL_AddRenderDriver(&_this->displays[i], &X11_RenderDriver);
+    }
 }
 
 SDL_Renderer *