aboutsummaryrefslogtreecommitdiff
path: root/backends/taskbar
diff options
context:
space:
mode:
authorJulien2011-06-16 12:31:34 -0400
committerJulien2011-06-16 14:27:22 -0400
commit149a8f8f11765107cbfe9e3c3b5e8fb27e621470 (patch)
tree7a78839afc9448304b46a951f75edb5287218228 /backends/taskbar
parent179630b46b8e24d6c87c114f97efa076a8fc19fa (diff)
downloadscummvm-rg350-149a8f8f11765107cbfe9e3c3b5e8fb27e621470.tar.gz
scummvm-rg350-149a8f8f11765107cbfe9e3c3b5e8fb27e621470.tar.bz2
scummvm-rg350-149a8f8f11765107cbfe9e3c3b5e8fb27e621470.zip
BACKENDS: Fix compilation of Win32TaskbarManager with mingw
Diffstat (limited to 'backends/taskbar')
-rw-r--r--backends/taskbar/win32/mingw-compat.h3
-rw-r--r--backends/taskbar/win32/win32-taskbar.cpp22
2 files changed, 17 insertions, 8 deletions
diff --git a/backends/taskbar/win32/mingw-compat.h b/backends/taskbar/win32/mingw-compat.h
index 3ee4b9aa5d..06968b62ff 100644
--- a/backends/taskbar/win32/mingw-compat.h
+++ b/backends/taskbar/win32/mingw-compat.h
@@ -34,6 +34,9 @@
#if defined(__GNUC__)
#ifdef __MINGW32__
+#ifdef _WIN32_WINNT
+ #undef _WIN32_WINNT
+#endif
#define _WIN32_WINNT 0x0501
#include <windows.h>
#include <commctrl.h>
diff --git a/backends/taskbar/win32/win32-taskbar.cpp b/backends/taskbar/win32/win32-taskbar.cpp
index c05b91d9f3..3754a03c76 100644
--- a/backends/taskbar/win32/win32-taskbar.cpp
+++ b/backends/taskbar/win32/win32-taskbar.cpp
@@ -23,16 +23,12 @@
*
*/
-// We need certain functions that are excluded by default
-#undef NONLS
-#undef NOICONS
-#include <windows.h>
-#if defined(ARRAYSIZE)
- #undef ARRAYSIZE
+// We cannot use common/scummsys.h directly as it will include
+// windows.h and we need to do it by hand to allow excluded functions
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
#endif
-#include "common/scummsys.h"
-
#if defined(WIN32) && defined(USE_TASKBAR)
// Needed for taskbar functions
@@ -43,6 +39,14 @@
#error Only compilation with MingW is supported
#endif
#else
+ // We need certain functions that are excluded by default
+ #undef NONLS
+ #undef NOICONS
+ #include <windows.h>
+ #if defined(ARRAYSIZE)
+ #undef ARRAYSIZE
+ #endif
+
// Default MSVC headers for ITaskbarList3 and IShellLink
#include <SDKDDKVer.h>
#endif
@@ -51,6 +55,8 @@
// For HWND
#include <SDL_syswm.h>
+#include "common/scummsys.h"
+
#include "backends/taskbar/win32/win32-taskbar.h"
#include "common/config-manager.h"