mirror of https://github.com/encounter/SDL.git
Fix compilation C90 mixed declarations and code (Thanks Cameron Gutman !)
This commit is contained in:
parent
e2b132ca74
commit
21a2e0c787
|
@ -1052,8 +1052,8 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format,
|
||||||
|
|
||||||
/* Set opaque and backup palette alpha values */
|
/* Set opaque and backup palette alpha values */
|
||||||
if (set_opaque) {
|
if (set_opaque) {
|
||||||
palette_saved_alpha = SDL_stack_alloc(Uint8, surface->format->palette->ncolors);
|
|
||||||
int i;
|
int i;
|
||||||
|
palette_saved_alpha = SDL_stack_alloc(Uint8, surface->format->palette->ncolors);
|
||||||
for (i = 0; i < surface->format->palette->ncolors; i++) {
|
for (i = 0; i < surface->format->palette->ncolors; i++) {
|
||||||
palette_saved_alpha[i] = surface->format->palette->colors[i].a;
|
palette_saved_alpha[i] = surface->format->palette->colors[i].a;
|
||||||
surface->format->palette->colors[i].a = SDL_ALPHA_OPAQUE;
|
surface->format->palette->colors[i].a = SDL_ALPHA_OPAQUE;
|
||||||
|
|
Loading…
Reference in New Issue