[Scummvm-cvs-logs] SF.net SVN: scummvm: [29791] scummvm/trunk/graphics/primitives.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Dec 9 15:43:31 CET 2007
Revision: 29791
http://scummvm.svn.sourceforge.net/scummvm/?rev=29791&view=rev
Author: fingolfin
Date: 2007-12-09 06:43:31 -0800 (Sun, 09 Dec 2007)
Log Message:
-----------
Fix for bug #1845876: MACOSX 10.2.8: sqrtf undefined
Modified Paths:
--------------
scummvm/trunk/graphics/primitives.cpp
Modified: scummvm/trunk/graphics/primitives.cpp
===================================================================
--- scummvm/trunk/graphics/primitives.cpp 2007-12-09 13:41:59 UTC (rev 29790)
+++ scummvm/trunk/graphics/primitives.cpp 2007-12-09 14:43:31 UTC (rev 29791)
@@ -26,6 +26,13 @@
namespace Graphics {
+#ifdef MACOSX
+// Older versions of Mac OS X didn't supply a sqrtf function. To ensure
+// binary compatibiity, we force using pow instead of sqrtf (the only
+// potential drawback is that it might be a little bit slower).
+#define sqrtf sqrt
+#endif
+
void drawLine(int x0, int y0, int x1, int y1, int color, void (*plotProc)(int, int, int, void *), void *data) {
// Bresenham's line algorithm, as described by Wikipedia
const bool steep = ABS(y1 - y0) > ABS(x1 - x0);
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