summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-18 01:45:42 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-18 01:45:42 +0300
commit0a602e0b62ee764cc1c1befdc75f2f4b875adc43 (patch)
treee5ed64532837b6a6d831404a51749f630b9f0e51 /src/graphicsmanager.cpp
parent2856e066d140c72c878805eb4ec961909551c1fb (diff)
downloadmanaverse-0a602e0b62ee764cc1c1befdc75f2f4b875adc43.tar.gz
manaverse-0a602e0b62ee764cc1c1befdc75f2f4b875adc43.tar.bz2
manaverse-0a602e0b62ee764cc1c1befdc75f2f4b875adc43.tar.xz
manaverse-0a602e0b62ee764cc1c1befdc75f2f4b875adc43.zip
Fix best renderer detection at first start.
It was broken if best mode is modern OpenGL.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 81296b1cb..b5907d785 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -1272,7 +1272,7 @@ void GraphicsManager::detectVideoSettings()
{
const Configuration &conf = test->getConfig();
int val = conf.getValueInt("opengl", -1);
- if (val >= 0 && val <= 2)
+ if (val >= 0 && val < static_cast<int>(RENDER_LAST))
{
config.setValue("opengl", val);
val = conf.getValue("useTextureSampler", -1);