summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/debugwindow.cpp12
-rw-r--r--src/gui/sdlfont.cpp6
-rw-r--r--src/gui/sdlfont.h2
-rw-r--r--src/gui/widgets/desktop.cpp4
4 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 0d7dee0c2..4f3d22463 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -40,6 +40,8 @@
#include "gui/widgets/layouthelper.h"
#include "gui/widgets/scrollarea.h"
+#include "render/renderers.h"
+
#include "resources/imagehelper.h"
#include "net/packetcounters.h"
@@ -202,20 +204,20 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
#ifdef USE_OPENGL
switch (imageHelper->useOpenGL())
{
- case 0:
+ case RENDER_SOFTWARE:
// TRANSLATORS: debug window label
mFPSText = _("%d FPS (Software)");
break;
- case 1:
+ case RENDER_NORMAL_OPENGL:
default:
// TRANSLATORS: debug window label
mFPSText = _("%d FPS (fast OpenGL)");
break;
- case 2:
+ case RENDER_SAFE_OPENGL:
// TRANSLATORS: debug window label
- mFPSText = _("%d FPS (old OpenGL)");
+ mFPSText = _("%d FPS (safe OpenGL)");
break;
- case 3:
+ case RENDER_GLES_OPENGL:
// TRANSLATORS: debug window label
mFPSText = _("%d FPS (mobile OpenGL)");
break;
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index c9093b747..54dbfbff6 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -48,7 +48,7 @@ const unsigned int CACHE_SIZE_SMALL3 = 170;
const unsigned int CLEAN_TIME = 7;
const int OUTLINE_SIZE = 1;
-bool SDLFont::mOpengl(true);
+bool SDLFont::mSoftMode(false);
char *strBuf;
@@ -99,7 +99,7 @@ bool SDLTextChunkSmall::operator<(const SDLTextChunkSmall &chunk) const
if (c2.b != color2.b)
return c2.b > color2.b;
- if (c.a != color.a && !SDLFont::mOpengl)
+ if (c.a != color.a && SDLFont::mSoftMode)
return c.a > color.a;
return false;
@@ -347,7 +347,7 @@ SDLFont::SDLFont(std::string filename,
if (fontCounter == 0)
{
- mOpengl = imageHelper->useOpenGL();
+ mSoftMode = imageHelper->useOpenGL() == RENDER_SOFTWARE;
if (TTF_Init() == -1)
{
throw GCN_EXCEPTION("Unable to initialize SDL_ttf: " +
diff --git a/src/gui/sdlfont.h b/src/gui/sdlfont.h
index 48e6c404f..29bf34769 100644
--- a/src/gui/sdlfont.h
+++ b/src/gui/sdlfont.h
@@ -147,7 +147,7 @@ class SDLFont final : public gcn::Font
int getDeleteCounter() const A_WARN_UNUSED
{ return mDeleteCounter; }
- static bool mOpengl;
+ static bool mSoftMode;
private:
TTF_Font *mFont;
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 0fd9fefef..93b0a96e7 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -100,7 +100,7 @@ void Desktop::draw(gcn::Graphics *graphics)
}
#ifndef USE_SDL2
- if (!imageHelper->useOpenGL())
+ if (imageHelper->useOpenGL() == RENDER_SOFTWARE)
{
g->drawImage(mWallpaper,
(width - wallpWidth) / 2,
@@ -153,7 +153,7 @@ void Desktop::setBestFittingWallpaper()
#ifdef USE_SDL2
if (false &&
#else
- if (!imageHelper->useOpenGL() &&
+ if (imageHelper->useOpenGL() == RENDER_SOFTWARE &&
#endif
(nWallPaper->getWidth() != width
|| nWallPaper->getHeight() != height))