summaryrefslogtreecommitdiff
path: root/src/gui/sdlfont.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-21 14:37:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:14 +0300
commitec1beaa2ee07368368e9bd45fe400eedc57419eb (patch)
treec8f4792dc2316c7cc852bcf6738dff7557d9b872 /src/gui/sdlfont.cpp
parent8d4af08b165e10d7e82380074ce733ee9d068c6a (diff)
downloadmv-ec1beaa2ee07368368e9bd45fe400eedc57419eb.tar.gz
mv-ec1beaa2ee07368368e9bd45fe400eedc57419eb.tar.bz2
mv-ec1beaa2ee07368368e9bd45fe400eedc57419eb.tar.xz
mv-ec1beaa2ee07368368e9bd45fe400eedc57419eb.zip
first part of fixes for compilation with SDL2
Diffstat (limited to 'src/gui/sdlfont.cpp')
-rw-r--r--src/gui/sdlfont.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index 2e974f6d8..b1e0092d7 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -137,7 +137,11 @@ void SDLTextChunk::generate(TTF_Font *const font, const float alpha)
sdlCol.b = static_cast<uint8_t>(color.b);
sdlCol.r = static_cast<uint8_t>(color.r);
sdlCol.g = static_cast<uint8_t>(color.g);
+#ifdef USE_SDL2
+ sdlCol.a = 0;
+#else
sdlCol.unused = 0;
+#endif
getSafeUtf8String(text, strBuf);
@@ -170,7 +174,11 @@ void SDLTextChunk::generate(TTF_Font *const font, const float alpha)
sdlCol2.b = static_cast<uint8_t>(color2.b);
sdlCol2.r = static_cast<uint8_t>(color2.r);
sdlCol2.g = static_cast<uint8_t>(color2.g);
+#ifdef USE_SDL2
+ sdlCol2.a = 0;
+#else
sdlCol2.unused = 0;
+#endif
SDL_Surface *const surface2 = TTF_RenderUTF8_Blended(
font, strBuf, sdlCol2);
if (!surface2)