diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-10 23:25:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-10 23:25:51 +0300 |
commit | b5a5f804e6beac792370a9aead9f951e67655b65 (patch) | |
tree | e20c6d6ab2b494c689552c2abc3cf22dbeec6ebb /src | |
parent | 7fd1401d915ee91c808695ca1f3647ca7a258a1f (diff) | |
download | manaverse-b5a5f804e6beac792370a9aead9f951e67655b65.tar.gz manaverse-b5a5f804e6beac792370a9aead9f951e67655b65.tar.bz2 manaverse-b5a5f804e6beac792370a9aead9f951e67655b65.tar.xz manaverse-b5a5f804e6beac792370a9aead9f951e67655b65.zip |
Fix loading icon two times.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windowmanager.cpp | 5 | ||||
-rw-r--r-- | src/progs/dyecmd/client.cpp | 12 | ||||
-rw-r--r-- | src/progs/manaplus/client.cpp | 12 |
3 files changed, 18 insertions, 11 deletions
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 054f19f12..c7b81d1a9 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -219,9 +219,6 @@ void WindowManager::initTitle() SDL::SetWindowTitle(mainGraphics->getWindow(), settings.windowCaption.c_str()); -#ifndef WIN32 - setIcon(); -#endif // WIN32 } void WindowManager::updateTitle() @@ -412,6 +409,7 @@ void WindowManager::newChatMessage() void WindowManager::setIcon() { +#ifndef ANDROID std::string iconFile = branding.getValue("appIcon", "icons/manaplus"); #ifdef WIN32 iconFile.append(".ico"); @@ -468,6 +466,7 @@ void WindowManager::setIcon() SDL::SetWindowIcon(mainGraphics->getWindow(), mIcon); } #endif // WIN32 +#endif // ANDROID } bool WindowManager::isKeyboardVisible() diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp index a46227f08..ccc8a51af 100644 --- a/src/progs/dyecmd/client.cpp +++ b/src/progs/dyecmd/client.cpp @@ -246,11 +246,12 @@ void Client::gameInit() eventsManager.enableEvents(); #ifdef WIN32 - Dirs::extractDataDir(); Dirs::mountDataDir(); #endif // WIN32 - +#ifndef USE_SDL2 WindowManager::setIcon(); +#endif // USE_SDL2 + ConfigManager::checkConfigVersion(); logVars(); Cpu::detect(); @@ -276,14 +277,14 @@ void Client::gameInit() Dirs::updateDataPath(); - // Add the main data directories to our PhysicsFS search path + // Add the main data directories to our VirtFs search path if (!settings.options.dataPath.empty()) { VirtFs::mountDir(settings.options.dataPath, Append_false); } - // Add the local data directory to PhysicsFS search path + // Add the local data directory to VirtFs search path VirtFs::mountDir(settings.localDataDir, Append_false); TranslationManager::loadCurrentLang(); @@ -292,6 +293,9 @@ void Client::gameInit() TranslationManager::loadGettextLang(); #endif // ENABLE_CUSTOMNLS +#ifdef USE_SDL2 + WindowManager::setIcon(); +#endif // USE_SDL2 WindowManager::initTitle(); mainGraphics->postInit(); diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp index 6526fc82a..af46d8683 100644 --- a/src/progs/manaplus/client.cpp +++ b/src/progs/manaplus/client.cpp @@ -375,11 +375,12 @@ void Client::gameInit() eventsManager.enableEvents(); #ifdef WIN32 - Dirs::extractDataDir(); Dirs::mountDataDir(); #endif // WIN32 - +#ifndef USE_SDL2 WindowManager::setIcon(); +#endif // USE_SDL2 + ConfigManager::checkConfigVersion(); logVars(); Cpu::detect(); @@ -411,14 +412,14 @@ void Client::gameInit() Dirs::updateDataPath(); - // Add the main data directories to our PhysicsFS search path + // Add the main data directories to our VirtFs search path if (!settings.options.dataPath.empty()) { VirtFs::mountDir(settings.options.dataPath, Append_false); } - // Add the local data directory to PhysicsFS search path + // Add the local data directory to VirtFs search path VirtFs::mountDir(settings.localDataDir, Append_false); TranslationManager::loadCurrentLang(); @@ -427,6 +428,9 @@ void Client::gameInit() TranslationManager::loadGettextLang(); #endif // ENABLE_CUSTOMNLS +#ifdef USE_SDL2 + WindowManager::setIcon(); +#endif // USE_SDL2 WindowManager::initTitle(); mainGraphics->postInit(); |