Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Minor cleanup in patches from Coursoud
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 27, 2010
1 parent 068a47a commit e9bbe6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/SDL_compat.c
Expand Up @@ -320,12 +320,9 @@ SDL_VideoPaletteChanged(void *userdata, SDL_Palette * palette)
}
}
if (userdata == SDL_VideoSurface) {
if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) {
/* The display surface not necessarily needs to have a palette.
* Just do nothing here and try to set the texture palette.
*/
//return -1;
}
/* The display may not have a palette, but always set texture palette */
SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors);

if (SDL_SetTexturePalette
(SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) {
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/video/SDL_video.c
Expand Up @@ -1467,7 +1467,7 @@ SDL_DestroyWindow(SDL_Window * window)
SDL_GL_UnloadLibrary();
}

/* Now invalidate magic */
/* Now invalidate magic */
window->magic = NULL;

/* Unlink the window from the list */
Expand Down

0 comments on commit e9bbe6a

Please sign in to comment.