diff options
Diffstat (limited to 'backends/taskbar')
-rw-r--r-- | backends/taskbar/win32/mingw-compat.h | 3 | ||||
-rw-r--r-- | backends/taskbar/win32/win32-taskbar.cpp | 22 |
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" |