diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-23 20:00:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:16 +0300 |
commit | ea2e8f7410f7fc993a2dc65f865f013a68fad1fc (patch) | |
tree | b815fc43c271731f8bdd696dc762b953ff41c339 | |
parent | d168ec33c553d1e331d1397d068fccdb70a594aa (diff) | |
download | manaplus-ea2e8f7410f7fc993a2dc65f865f013a68fad1fc.tar.gz manaplus-ea2e8f7410f7fc993a2dc65f865f013a68fad1fc.tar.bz2 manaplus-ea2e8f7410f7fc993a2dc65f865f013a68fad1fc.tar.xz manaplus-ea2e8f7410f7fc993a2dc65f865f013a68fad1fc.zip |
fix outlined text draw in SDL2.
-rw-r--r-- | src/gui/sdlfont.cpp | 4 | ||||
-rw-r--r-- | src/sdl2graphics.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp index b1e0092d7..e1a0cf832 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -138,7 +138,7 @@ void SDLTextChunk::generate(TTF_Font *const font, const float alpha) sdlCol.r = static_cast<uint8_t>(color.r); sdlCol.g = static_cast<uint8_t>(color.g); #ifdef USE_SDL2 - sdlCol.a = 0; + sdlCol.a = 255; #else sdlCol.unused = 0; #endif @@ -175,7 +175,7 @@ void SDLTextChunk::generate(TTF_Font *const font, const float alpha) sdlCol2.r = static_cast<uint8_t>(color2.r); sdlCol2.g = static_cast<uint8_t>(color2.g); #ifdef USE_SDL2 - sdlCol2.a = 0; + sdlCol2.a = 255; #else sdlCol2.unused = 0; #endif diff --git a/src/sdl2graphics.cpp b/src/sdl2graphics.cpp index 09b52470b..6d6a745ec 100644 --- a/src/sdl2graphics.cpp +++ b/src/sdl2graphics.cpp @@ -44,8 +44,9 @@ int MSDL_gfxBlitRGBA(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect) { - return 0; -// return SDL_gfxBlitRGBA(src, srcrect, dst, dstrect); + SDL_SetSurfaceBlendMode (src, SDL_BLENDMODE_BLEND); + SDL_BlitSurface(src, srcrect, dst, dstrect); + return 1; } #if SDL_BYTEORDER == SDL_LIL_ENDIAN |