Mercurial > sdl-ios-xcode
comparison src/video/SDL_video.c @ 2328:91e601d9df8b
re: bug#563. checking in some commented out trace code and a fix so that the in testalpha.c the background only flashes when alpha == 255. The problem that is being
fixed is caused by clearing SDL_COPY_RLE_COLORKEY without setting SDL_COPY_RLE_DESIRED in SDL_UnRELSurface.
author | Bob Pendleton <bob@pendleton.com> |
---|---|
date | Fri, 14 Mar 2008 18:17:49 +0000 |
parents | 3202e4826c57 |
children | ad4a291c85ab 56cf872c723a e27bdcc80744 |
comparison
equal
deleted
inserted
replaced
2327:7b53a8401195 | 2328:91e601d9df8b |
---|---|
1327 for (j = 0; j < display->num_windows; ++j) { | 1327 for (j = 0; j < display->num_windows; ++j) { |
1328 SDL_Window *window = &display->windows[j]; | 1328 SDL_Window *window = &display->windows[j]; |
1329 if (window->id != windowID) { | 1329 if (window->id != windowID) { |
1330 continue; | 1330 continue; |
1331 } | 1331 } |
1332 if (window->title) { | |
1333 SDL_free(window->title); | |
1334 window->title = NULL; | |
1335 } | |
1332 if (window->renderer) { | 1336 if (window->renderer) { |
1333 SDL_DestroyRenderer(window->id); | 1337 SDL_DestroyRenderer(window->id); |
1338 window->renderer = NULL; | |
1334 } | 1339 } |
1335 if (_this->DestroyWindow) { | 1340 if (_this->DestroyWindow) { |
1336 _this->DestroyWindow(_this, window); | 1341 _this->DestroyWindow(_this, window); |
1337 } | |
1338 if (window->title) { | |
1339 SDL_free(window->title); | |
1340 } | 1342 } |
1341 if (j != display->num_windows - 1) { | 1343 if (j != display->num_windows - 1) { |
1342 SDL_memcpy(&display->windows[i], | 1344 SDL_memcpy(&display->windows[i], |
1343 &display->windows[i + 1], | 1345 &display->windows[i + 1], |
1344 (display->num_windows - i - 1) * sizeof(*window)); | 1346 (display->num_windows - i - 1) * sizeof(*window)); |
1437 | 1439 |
1438 /* Free any existing renderer */ | 1440 /* Free any existing renderer */ |
1439 SDL_DestroyRenderer(windowID); | 1441 SDL_DestroyRenderer(windowID); |
1440 | 1442 |
1441 /* Create a new renderer instance */ | 1443 /* Create a new renderer instance */ |
1442 window->renderer = | 1444 window->renderer = SDL_CurrentDisplay.render_drivers[index] |
1443 SDL_CurrentDisplay.render_drivers[index].CreateRenderer(window, | 1445 .CreateRenderer(window, flags); |
1444 flags); | |
1445 SDL_SelectRenderer(window->id); | 1446 SDL_SelectRenderer(window->id); |
1446 | 1447 |
1447 return 0; | 1448 return 0; |
1448 } | 1449 } |
1449 | 1450 |
2218 SDL_FreePalette(display->palette); | 2219 SDL_FreePalette(display->palette); |
2219 display->palette = NULL; | 2220 display->palette = NULL; |
2220 } | 2221 } |
2221 if (display->gamma) { | 2222 if (display->gamma) { |
2222 SDL_free(display->gamma); | 2223 SDL_free(display->gamma); |
2224 display->gamma = NULL; | |
2223 } | 2225 } |
2224 if (display->driverdata) { | 2226 if (display->driverdata) { |
2225 SDL_free(display->driverdata); | 2227 SDL_free(display->driverdata); |
2228 display->driverdata = NULL; | |
2226 } | 2229 } |
2227 } | 2230 } |
2228 if (_this->displays) { | 2231 if (_this->displays) { |
2229 SDL_free(_this->displays); | 2232 SDL_free(_this->displays); |
2230 _this->displays = NULL; | 2233 _this->displays = NULL; |