summaryrefslogtreecommitdiff
path: root/src/gui/sdlfont.cpp
diff options
context:
space:
mode:
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
}