comparison 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
comparison
equal deleted inserted replaced
3519:1374f9275de9 3520:83518f8fcd61
48 48
49 #define DUMMYVID_DRIVER_NAME "dummy" 49 #define DUMMYVID_DRIVER_NAME "dummy"
50 50
51 /* Initialization/Query functions */ 51 /* Initialization/Query functions */
52 static int DUMMY_VideoInit(_THIS); 52 static int DUMMY_VideoInit(_THIS);
53 static int DUMMY_SetDisplayMode(_THIS, SDL_DisplayMode * mode); 53 static int DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
54 static void DUMMY_VideoQuit(_THIS); 54 static void DUMMY_VideoQuit(_THIS);
55 55
56 /* DUMMY driver bootstrap functions */ 56 /* DUMMY driver bootstrap functions */
57 57
58 static int 58 static int
113 mode.format = SDL_PIXELFORMAT_RGB888; 113 mode.format = SDL_PIXELFORMAT_RGB888;
114 mode.w = 1024; 114 mode.w = 1024;
115 mode.h = 768; 115 mode.h = 768;
116 mode.refresh_rate = 0; 116 mode.refresh_rate = 0;
117 mode.driverdata = NULL; 117 mode.driverdata = NULL;
118 SDL_AddBasicVideoDisplay(&mode); 118 if (SDL_AddBasicVideoDisplay(&mode) < 0) {
119 SDL_AddRenderDriver(0, &SDL_DUMMY_RenderDriver); 119 return -1;
120 }
121 SDL_AddRenderDriver(&_this->displays[0], &SDL_DUMMY_RenderDriver);
120 122
121 SDL_zero(mode); 123 SDL_zero(mode);
122 SDL_AddDisplayMode(0, &mode); 124 SDL_AddDisplayMode(0, &mode);
123 125
124 /* We're done! */ 126 /* We're done! */
125 return 0; 127 return 0;
126 } 128 }
127 129
128 static int 130 static int
129 DUMMY_SetDisplayMode(_THIS, SDL_DisplayMode * mode) 131 DUMMY_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
130 { 132 {
131 return 0; 133 return 0;
132 } 134 }
133 135
134 void 136 void