From 328ed1cf94a5a18fad75ae7057202b5c05138765 Mon Sep 17 00:00:00 2001 From: matthijs Date: Thu, 14 Feb 2013 11:06:12 +0000 Subject: (svn r24993) -Fix: [SDL] Improve 8bpp hardware palette support. Instead of always requesting SDL_HWPALETTE, it is now only done for 8bp blitters in fullscreen mode. - This fixes 32bpp blitters on 8bpp X11, which would only render garbage with SDL_HWPALETTE. - This prevents the colors of other applications from being messed up when running a 8bpp blitter on a 8bpp system. - When running a 8bpp blitter on an 8bpp system without SDL_HWPALETTE (e.g., in windowed mode), this uses a new shadow surface with color approximation. - The use of a hardware palette can be forced on and off using -v sdl:hw_palette=1 or -v sdl:hw_palette=0 --- src/sdl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sdl.h') diff --git a/src/sdl.h b/src/sdl.h index 2f4131e1a..ff1092358 100644 --- a/src/sdl.h +++ b/src/sdl.h @@ -57,6 +57,8 @@ void SdlClose(uint32 x); Uint32 (SDLCALL *SDL_MapRGB)(SDL_PixelFormat *, Uint8, Uint8, Uint8); int (SDLCALL *SDL_VideoModeOK)(int, int, int, Uint32); SDL_version *(SDLCALL *SDL_Linked_Version)(); + int (SDLCALL *SDL_BlitSurface)(SDL_Surface *, SDL_Rect *, SDL_Surface *, SDL_Rect *); + SDL_Surface *(SDLCALL *SDL_CreateRGBSurface)(Uint32, int, int, int, Uint32, Uint32, Uint32, Uint32); }; extern SDLProcs sdl_proc; -- cgit v1.2.3-54-g00ecf