diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-28 18:17:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-28 18:17:07 +0300 |
commit | 44ba78bd7f727bf8ff2a79810413b42c6ff84b63 (patch) | |
tree | 9412b8130b2bcab91ee084ee418c75f53635fe03 /src | |
parent | 4010ff9dac72bb5d7c076610131f50390d193669 (diff) | |
download | manaplus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.tar.gz manaplus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.tar.bz2 manaplus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.tar.xz manaplus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.zip |
Use fonts loading with physfs only with SDL2.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/sdlfont.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp index f316b46d6..d332b59db 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -31,7 +31,7 @@ #include "resources/image.h" #include "resources/imagehelper.h" -#ifdef WIN32 +#ifndef USE_SDL2 #include "resources/resourcemanager.h" #endif #include "resources/surfaceimagehelper.h" @@ -398,14 +398,14 @@ SDLFont::~SDLFont() TTF_Font *SDLFont::openFont(const char *const name, const int size) { -#ifdef WIN32 - return TTF_OpenFontIndex(ResourceManager::getInstance()->getPath( - name).c_str(), size, 0); -#else +#ifdef USE_SDL2 SDL_RWops *const rw = MPHYSFSRWOPS_openRead(name); if (!rw) return nullptr; return TTF_OpenFontIndexRW(rw, 1, size, 0); +#else + return TTF_OpenFontIndex(ResourceManager::getInstance()->getPath( + name).c_str(), size, 0); #endif } |