diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-03-30 08:45:19 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-03-30 08:45:19 +0000 |
commit | 8e21ead1c1451900f9e5fbef3be4d4f0a2d22861 (patch) | |
tree | 32dd269fdc98e33d5c836529321c006f33bac995 | |
parent | c68b23548acdc672ac1e1f7737b1fb8edc41a210 (diff) | |
download | navit-svn-8e21ead1c1451900f9e5fbef3be4d4f0a2d22861.tar.gz |
Add:graphics_sdl:Flags for using SW_SURFACE
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@3100 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | graphics/sdl/graphics_sdl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/graphics/sdl/graphics_sdl.c b/graphics/sdl/graphics_sdl.c index 8e7f561b..e8c85de9 100644 --- a/graphics/sdl/graphics_sdl.c +++ b/graphics/sdl/graphics_sdl.c @@ -2136,11 +2136,16 @@ graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr * w=attr->u.num; if ((attr=attr_search(attrs, NULL, attr_h))) h=attr->u.num; - if (attr=attr_search(attrs, NULL, attr_bpp)) + if ((attr=attr_search(attrs, NULL, attr_bpp))) this->video_bpp=attr->u.num; - if (attr=attr_search(attrs, NULL, attr_frame)) + if ((attr=attr_search(attrs, NULL, attr_flags))) { + if (attr->u.num & 1) + this->video_flags = SDL_SWSURFACE; + } + if ((attr=attr_search(attrs, NULL, attr_frame))) { if(!attr->u.num) this->video_flags |= SDL_NOFRAME; + } this->screen = SDL_SetVideoMode(w, h, this->video_bpp, this->video_flags); |