summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-04 14:42:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-04 15:26:34 +0300
commitf2d1d2b43a0ebdb625aea94cb4b8ff7fce6bf8f4 (patch)
tree697535ca4d8e50ee6da8cf364cad814fa5f7603a /src
parentc41454ffb04305b5cf81535bb45c797ebfac92fb (diff)
downloadmv-f2d1d2b43a0ebdb625aea94cb4b8ff7fce6bf8f4.tar.gz
mv-f2d1d2b43a0ebdb625aea94cb4b8ff7fce6bf8f4.tar.bz2
mv-f2d1d2b43a0ebdb625aea94cb4b8ff7fce6bf8f4.tar.xz
mv-f2d1d2b43a0ebdb625aea94cb4b8ff7fce6bf8f4.zip
fix window icon in windows.v1.4.1.4
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 27c55dcee..43c474dab 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -356,6 +356,10 @@ void Client::gameInit()
SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);
SDL_EventState(SDL_USEREVENT, SDL_IGNORE);
+#ifdef WIN32
+ setIcon();
+#endif
+
initGraphics();
extractDataDir();
mountDataDir();
@@ -586,7 +590,9 @@ void Client::initTitle()
}
SDL::SetWindowTitle(mainGraphics->getWindow(), mCaption.c_str());
+#ifndef WIN32
setIcon();
+#endif
}
#ifdef ANDROID
@@ -2965,6 +2971,8 @@ void Client::setIcon()
// Attempt to load icon from .ico file
HICON icon = (HICON) LoadImage(nullptr, iconFile.c_str(),
IMAGE_ICON, 64, 64, LR_LOADFROMFILE);
+ if (!icon)
+ logger->log("icon load error");
// If it's failing, we load the default resource file.
if (!icon)
icon = LoadIcon(GetModuleHandle(nullptr), "A");