[Scummvm-cvs-logs] scummvm master -> ef695cb7dd17aaa24378c834a5ba5d78e6093792
bluegr
md5 at scummvm.org
Tue Aug 9 01:28:36 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ef695cb7dd OPENGL: Added a temporary hack to fix compilation under Windows, after the latest changes to the SDL interface layer
Commit: ef695cb7dd17aaa24378c834a5ba5d78e6093792
https://github.com/scummvm/scummvm/commit/ef695cb7dd17aaa24378c834a5ba5d78e6093792
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-08-08T16:24:59-07:00
Commit Message:
OPENGL: Added a temporary hack to fix compilation under Windows, after the latest changes to the SDL interface layer
Changed paths:
backends/graphics/opengl/gltexture.h
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index f0cd7ae..3e04949 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -31,6 +31,16 @@
#undef ARRAYSIZE
#endif
+// HACK: At this point in Windows platforms, common/util.h has been included
+// via common/rect.h (from backends/graphics/sdl/sdl-graphics.h), via
+// backends/graphics/openglsdl/openglsdl-graphics.h. Thus, we end up with
+// COMMON_UTIL_H defined, and ARRAYSIZE undefined (bad!). Therefore,
+// ARRAYSIZE is undefined in openglsdl-graphics.cpp. This is a temporary
+// hackish solution fo fix compilation under Windows.
+#if !defined(ARRAYSIZE) && defined(COMMON_UTIL_H)
+#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0])))
+#endif
+
#if defined(USE_GLES)
#include <GLES/gl.h>
#elif defined(SDL_BACKEND)
More information about the Scummvm-git-logs
mailing list