summaryrefslogtreecommitdiff
path: root/src/gui/sdlfont.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-28 18:17:07 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-28 18:17:07 +0300
commit44ba78bd7f727bf8ff2a79810413b42c6ff84b63 (patch)
tree9412b8130b2bcab91ee084ee418c75f53635fe03 /src/gui/sdlfont.cpp
parent4010ff9dac72bb5d7c076610131f50390d193669 (diff)
downloadplus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.tar.gz
plus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.tar.bz2
plus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.tar.xz
plus-44ba78bd7f727bf8ff2a79810413b42c6ff84b63.zip
Use fonts loading with physfs only with SDL2.
Diffstat (limited to 'src/gui/sdlfont.cpp')
-rw-r--r--src/gui/sdlfont.cpp10
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
}