diff src/video/dummy/SDL_nullvideo.c @ 3520:83518f8fcd61

Fixed calls to SDL_AddRenderDriver()
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Dec 2009 08:45:08 +0000
parents 99210400e8b9
children 101f94947013
line wrap: on
line diff
--- a/src/video/dummy/SDL_nullvideo.c	Fri Dec 04 08:26:32 2009 +0000
+++ b/src/video/dummy/SDL_nullvideo.c	Fri Dec 04 08:45:08 2009 +0000
@@ -50,7 +50,7 @@
 
 /* Initialization/Query functions */
 static int DUMMY_VideoInit(_THIS);
-static int DUMMY_SetDisplayMode(_THIS, SDL_DisplayMode * mode);
+static int DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
 static void DUMMY_VideoQuit(_THIS);
 
 /* DUMMY driver bootstrap functions */
@@ -115,8 +115,10 @@
     mode.h = 768;
     mode.refresh_rate = 0;
     mode.driverdata = NULL;
-    SDL_AddBasicVideoDisplay(&mode);
-    SDL_AddRenderDriver(0, &SDL_DUMMY_RenderDriver);
+    if (SDL_AddBasicVideoDisplay(&mode) < 0) {
+        return -1;
+    }
+    SDL_AddRenderDriver(&_this->displays[0], &SDL_DUMMY_RenderDriver);
 
     SDL_zero(mode);
     SDL_AddDisplayMode(0, &mode);
@@ -126,7 +128,7 @@
 }
 
 static int
-DUMMY_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
+DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
 {
     return 0;
 }