diff options
-rw-r--r-- | src/client.cpp | 12 | ||||
-rw-r--r-- | src/graphicsmanager.cpp | 4 | ||||
-rw-r--r-- | src/graphicsmanager.h | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp index b42dd51c6..2af0eb84d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -365,9 +365,15 @@ void Client::gameInit() extractDataDir(); mountDataDir(); setIcon(); + checkConfigVersion(); + logVars(); + Cpu::detect(); initGraphics(); #else setIcon(); + checkConfigVersion(); + logVars(); + Cpu::detect(); initGraphics(); extractDataDir(); mountDataDir(); @@ -537,8 +543,6 @@ void Client::createWindows() void Client::initGraphics() { - checkConfigVersion(); - #if defined(USE_OPENGL) #if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__) if (!mOptions.safeMode && mOptions.test.empty() @@ -573,9 +577,7 @@ void Client::initGraphics() config.getBoolValue("alphaCache")); ImageHelper::setEnableAlpha(config.getFloatValue("guialpha") != 1.0F); #endif - logVars(); - Cpu::detect(); - graphicsManager.initGraphics(mOptions.noOpenGL); + graphicsManager.createRenderers(mOptions.noOpenGL); graphicsManager.detectPixelSize(); runCounters = config.getBoolValue("packetcounters"); applyVSync(); diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index f624ed850..8dffafeb4 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -238,7 +238,7 @@ int GraphicsManager::detectGraphics() | (1024 * textureSampler) | (2048 * compressTextures); } -void GraphicsManager::initGraphics(const bool noOpenGL) +void GraphicsManager::createRenderers(const bool noOpenGL) { RenderType useOpenGL = RENDER_SOFTWARE; if (!noOpenGL) @@ -304,7 +304,7 @@ void GraphicsManager::initGraphics(const bool noOpenGL) #else // USE_OPENGL -void GraphicsManager::initGraphics(const bool noOpenGL) +void GraphicsManager::createRenderers(const bool noOpenGL) { RenderType useOpenGL = RENDER_SOFTWARE; if (!noOpenGL) diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h index ff70e7634..991d7e63b 100644 --- a/src/graphicsmanager.h +++ b/src/graphicsmanager.h @@ -76,7 +76,7 @@ class GraphicsManager final ~GraphicsManager(); - void initGraphics(const bool noOpenGL); + void createRenderers(const bool noOpenGL); static void setVideoMode(); |