[Scummvm-cvs-logs] SF.net SVN: scummvm:[45814] scummvm/trunk/backends/platform/sdl/main.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Nov 10 21:42:46 CET 2009


Revision: 45814
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45814&view=rev
Author:   lordhoto
Date:     2009-11-10 20:42:46 +0000 (Tue, 10 Nov 2009)

Log Message:
-----------
Fix for bug #2895217 "MSVC compilation broken with r47595".

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/main.cpp

Modified: scummvm/trunk/backends/platform/sdl/main.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/main.cpp	2009-11-10 20:29:50 UTC (rev 45813)
+++ scummvm/trunk/backends/platform/sdl/main.cpp	2009-11-10 20:42:46 UTC (rev 45814)
@@ -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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list