From 7b7763021b86fbebb79397dd7eec8024e7cb1a6d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 10 Nov 2009 20:42:46 +0000 Subject: Fix for bug #2895217 "MSVC compilation broken with r47595". svn-id: r45814 --- backends/platform/sdl/main.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'backends/platform/sdl/main.cpp') diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp index 7140a69cea..b38b815438 100644 --- a/backends/platform/sdl/main.cpp +++ b/backends/platform/sdl/main.cpp @@ -23,6 +23,16 @@ * */ +// Fix for bug #2895217 "MSVC compilation broken with r47595": +// We need to keep this on top of the "common/scummsys.h" include, +// otherwise we will get errors about the windows headers redefining +// "ARRAYSIZE" for example. +#if defined(WIN32) && !defined(__SYMBIAN32__) +#include +// winnt.h defines ARRAYSIZE, but we want our own one... +#undef ARRAYSIZE +#endif + #include "common/scummsys.h" // Several SDL based ports use a custom main, and hence do not want to compile @@ -34,12 +44,7 @@ #include "backends/plugins/sdl/sdl-provider.h" #include "base/main.h" -#if defined(WIN32) - -#include -// winnt.h defines ARRAYSIZE, but we want our own one... -#undef ARRAYSIZE - +#ifdef WIN32 int __stdcall WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*iShowCmd*/) { SDL_SetModuleHandle(GetModuleHandle(NULL)); return main(__argc, __argv); -- cgit v1.2.3