From 51b19abe02a9cc7fc43b04d610715d92a4a043b0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 27 Sep 2010 01:30:42 -0700 Subject: [PATCH] Minor cleanup in patches from Coursoud --- src/SDL_compat.c | 9 +++------ src/video/SDL_video.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/SDL_compat.c b/src/SDL_compat.c index b4cd7c2c0..47f4eb68c 100644 --- a/src/SDL_compat.c +++ b/src/SDL_compat.c @@ -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; diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index b9d1d923e..f13deaf4a 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -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 */