Mercurial > sdl-ios-xcode
diff src/video/SDL_surface.c @ 5187:d976b67150c5
Restored SDL_BLENDMODE_MOD for MAME
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 04 Feb 2011 19:50:56 -0800 |
parents | e743b9c3f6d6 |
children | bbdf9250ee8b |
line wrap: on
line diff
--- a/src/video/SDL_surface.c Fri Feb 04 19:18:08 2011 -0800 +++ b/src/video/SDL_surface.c Fri Feb 04 19:50:56 2011 -0800 @@ -448,7 +448,8 @@ status = 0; flags = surface->map->info.flags; - surface->map->info.flags &= ~(SDL_COPY_BLEND | SDL_COPY_ADD); + surface->map->info.flags &= + ~(SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD); switch (blendMode) { case SDL_BLENDMODE_NONE: break; @@ -458,6 +459,9 @@ case SDL_BLENDMODE_ADD: surface->map->info.flags |= SDL_COPY_ADD; break; + case SDL_BLENDMODE_MOD: + surface->map->info.flags |= SDL_COPY_MOD; + break; default: SDL_Unsupported(); status = -1; @@ -489,13 +493,17 @@ return 0; } - switch (surface->map->info.flags & (SDL_COPY_BLEND | SDL_COPY_ADD)) { + switch (surface->map-> + info.flags & (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD)) { case SDL_COPY_BLEND: *blendMode = SDL_BLENDMODE_BLEND; break; case SDL_COPY_ADD: *blendMode = SDL_BLENDMODE_ADD; break; + case SDL_COPY_MOD: + *blendMode = SDL_BLENDMODE_MOD; + break; default: *blendMode = SDL_BLENDMODE_NONE; break;