summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 2a854bc0..63452112 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -80,8 +80,9 @@
#include <SDL_image.h>
#ifdef _WIN32
-#include <SDL_syswm.h>
#include "utils/specialfolder.h"
+#include <SDL_syswm.h>
+#include <winuser.h>
#endif
#include <sys/stat.h>
@@ -332,7 +333,7 @@ Client::Client(const Options &options):
logger->log("Loading icon from file: %s", iconFile.c_str());
#ifdef _WIN32
static SDL_SysWMinfo pInfo;
- SDL_GetWMInfo(&pInfo);
+ SDL_GetWindowWMInfo(mVideo.window(), &pInfo);
// Attempt to load icon from .ico file
HICON icon = (HICON) LoadImage(NULL,
iconFile.c_str(),
@@ -342,7 +343,7 @@ Client::Client(const Options &options):
icon = LoadIcon(GetModuleHandle(NULL), "A");
if (icon)
- SetClassLong(pInfo.window, GCL_HICON, (LONG) icon);
+ SetClassLongPtr(pInfo.info.win.window, GCLP_HICON, (LONG_PTR) icon);
#else
mIcon = IMG_Load(iconFile.c_str());
if (mIcon)