summaryrefslogtreecommitdiff
path: root/src/sdl.h
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2013-02-14 11:06:12 +0000
committermatthijs <matthijs@openttd.org>2013-02-14 11:06:12 +0000
commit328ed1cf94a5a18fad75ae7057202b5c05138765 (patch)
treea5c8d78bae456bd8681f6f8f54e85febf7c236b9 /src/sdl.h
parentafcb4a25b22abb229dd302339fbf7b603c0e1deb (diff)
downloadopenttd-328ed1cf94a5a18fad75ae7057202b5c05138765.tar.xz
(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
Diffstat (limited to 'src/sdl.h')
-rw-r--r--src/sdl.h2
1 files changed, 2 insertions, 0 deletions
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;