comparison src/video/SDL_renderer_sw.c @ 2905:d214e791c77c

Fixed crash when resizing the window with the software renderer. This is similar to the crash fix in the OpenGL renderer in revision 4187
author Sam Lantinga <slouken@libsdl.org>
date Mon, 22 Dec 2008 04:52:43 +0000
parents fa81cc1ef3d0
children 2133d2d300fd
comparison
equal deleted inserted replaced
2904:fa81cc1ef3d0 2905:d214e791c77c
358 if (data->renderer && data->renderer->DisplayModeChanged) { 358 if (data->renderer && data->renderer->DisplayModeChanged) {
359 if (data->renderer->DisplayModeChanged(data->renderer) < 0) { 359 if (data->renderer->DisplayModeChanged(data->renderer) < 0) {
360 return -1; 360 return -1;
361 } 361 }
362 } 362 }
363 /* Rebind the context to the window area */
363 data->updateSize = SDL_TRUE; 364 data->updateSize = SDL_TRUE;
364 return 0; 365 return SW_ActivateRenderer(renderer);
365 } 366 }
366 367
367 static int 368 static int
368 SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) 369 SW_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
369 { 370 {