diff options
author | Johannes Schickel | 2009-11-10 20:42:46 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-11-10 20:42:46 +0000 |
commit | 7b7763021b86fbebb79397dd7eec8024e7cb1a6d (patch) | |
tree | 78fcc7b09a62c845143069bcfb31eebb177d2980 /backends | |
parent | 5859a9a8928bcdd123349dbd32d1821701cfc249 (diff) | |
download | scummvm-rg350-7b7763021b86fbebb79397dd7eec8024e7cb1a6d.tar.gz scummvm-rg350-7b7763021b86fbebb79397dd7eec8024e7cb1a6d.tar.bz2 scummvm-rg350-7b7763021b86fbebb79397dd7eec8024e7cb1a6d.zip |
Fix for bug #2895217 "MSVC compilation broken with r47595".
svn-id: r45814
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/sdl/main.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
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 <windows.h> +// 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 <windows.h> -// 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); |