diff options
author | David Athay <ko2fan@gmail.com> | 2008-11-12 16:33:17 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-11-12 16:33:17 +0000 |
commit | 87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4 (patch) | |
tree | 499689cb9691b7bb04f9f88be9bbd355e55f47ea /src/main.cpp | |
parent | d2bf248c7623324dc6a133b1e5eb0e71235d883a (diff) | |
download | mana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.tar.gz mana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.tar.bz2 mana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.tar.xz mana-client-87607bbc8bf97d8204be4b3eae6eeb5a51bb0ea4.zip |
Fixed chat transparency and icon loading.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/main.cpp b/src/main.cpp index 67eeccd6..ede00d57 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -267,22 +267,6 @@ void initEngine(const Options &options) SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); SDL_WM_SetCaption(branding.getValue("appName", "The Mana World").c_str(), NULL); -#ifdef WIN32 - static SDL_SysWMinfo pInfo; - SDL_GetWMInfo(&pInfo); - HICON icon = LoadIcon(GetModuleHandle(NULL), "A"); - if (icon) - { - SetClassLong(pInfo.window, GCL_HICON, (LONG) icon); - } -#else - SDL_Surface *icon = IMG_Load(TMW_DATADIR branding.getValue("appIcon", "data/icons/tmw.png")); - if (icon) - { - SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE); - SDL_WM_SetIcon(icon, NULL); - } -#endif ResourceManager *resman = ResourceManager::getInstance(); @@ -354,6 +338,23 @@ void initEngine(const Options &options) resman->addToSearchPath(TMW_DATADIR "data", true); #endif +#ifdef WIN32 + static SDL_SysWMinfo pInfo; + SDL_GetWMInfo(&pInfo); + HICON icon = LoadIcon(GetModuleHandle(NULL), "A"); + if (icon) + { + SetClassLong(pInfo.window, GCL_HICON, (LONG) icon); + } +#else + SDL_Surface *icon = IMG_Load(resman->getPath(branding.getValue("appIcon", "data/icons/tmw.png")).c_str()); + if (icon) + { + SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE); + SDL_WM_SetIcon(icon, NULL); + } +#endif + #ifdef USE_OPENGL bool useOpenGL = (config.getValue("opengl", 0) == 1); |