comparison src/video/ps3/SDL_ps3video.c @ 3157:cce01ba54174 gsoc2009_ps3

Added comments, clean up.
author Martin Lowinski <martin@goldtopf.org>
date Thu, 27 Aug 2009 11:33:56 +0000
parents 7f3341cccf42
children
comparison
equal deleted inserted replaced
3156:4ead4cef6b7b 3157:cce01ba54174
127 deprintf(1, "PS3_VideoInit()\n"); 127 deprintf(1, "PS3_VideoInit()\n");
128 128
129 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; 129 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
130 SDL_DisplayMode mode; 130 SDL_DisplayMode mode;
131 131
132 #if 0
133 /* Use a fake 32-bpp desktop mode */
134 mode.format = SDL_PIXELFORMAT_RGB888;
135 mode.w = 1920;
136 mode.h = 1080;
137 mode.refresh_rate = 0;
138 mode.driverdata = NULL;
139 SDL_AddBasicVideoDisplay(&mode);
140 SDL_AddRenderDriver(0, &SDL_PS3_RenderDriver);
141
142 //SDL_zero(mode);
143 SDL_AddDisplayMode(0, &mode);
144 //display.desktop_mode = mode;
145 //display.current_mode = mode;
146 #endif
147
148 /*
149 *PS3 stuff
150 */
151
152 /* Create SPU fb_parms and thread structure */ 132 /* Create SPU fb_parms and thread structure */
153 data->fb_parms = (struct fb_writer_parms_t *) 133 data->fb_parms = (struct fb_writer_parms_t *)
154 memalign(16, sizeof(struct fb_writer_parms_t)); 134 memalign(16, sizeof(struct fb_writer_parms_t));
155 data->fb_thread_data = (spu_data_t *) malloc(sizeof(spu_data_t)); 135 data->fb_thread_data = (spu_data_t *) malloc(sizeof(spu_data_t));
156 if (data->fb_parms == NULL || data->fb_thread_data == NULL) { 136 if (data->fb_parms == NULL || data->fb_thread_data == NULL) {
198 } 178 }
199 179
200 /* Blank screen */ 180 /* Blank screen */
201 memset(data->frame_buffer, 0x00, fb_finfo.smem_len); 181 memset(data->frame_buffer, 0x00, fb_finfo.smem_len);
202 182
203 #if 1
204 PS3_InitModes(_this); 183 PS3_InitModes(_this);
205
206 SDL_AddRenderDriver(0, &SDL_PS3_RenderDriver); 184 SDL_AddRenderDriver(0, &SDL_PS3_RenderDriver);
207 #endif
208 185
209 /* We're done! */ 186 /* We're done! */
210 return 0; 187 return 0;
211 } 188 }
212 189