From 44ba78bd7f727bf8ff2a79810413b42c6ff84b63 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 28 Sep 2013 18:17:07 +0300 Subject: Use fonts loading with physfs only with SDL2. --- src/gui/sdlfont.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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 } -- cgit v1.2.3-70-g09d2