diff options
-rw-r--r-- | graphics/surface.cpp | 6 | ||||
-rw-r--r-- | graphics/surface.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp index a8173f0e9c..777c1058fb 100644 --- a/graphics/surface.cpp +++ b/graphics/surface.cpp @@ -133,7 +133,7 @@ const Surface Surface::getSubArea(const Common::Rect &area) const { return subSurface; } -void Surface::copyRectToSurface(const void *buffer, int pitch, int destX, int destY, int width, int height) { +void Surface::copyRectToSurface(const void *buffer, int srcPitch, int destX, int destY, int width, int height) { assert(buffer); assert(destX >= 0 && destX < w); @@ -146,8 +146,8 @@ void Surface::copyRectToSurface(const void *buffer, int pitch, int destX, int de byte *dst = (byte *)getBasePtr(destX, destY); for (int i = 0; i < height; i++) { memcpy(dst, src, width * format.bytesPerPixel); - src += pitch; - dst += this->pitch; + src += srcPitch; + dst += pitch; } } diff --git a/graphics/surface.h b/graphics/surface.h index 1492e71e68..07e289b0bb 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -219,7 +219,7 @@ public: * @param width The width of the destination rectangle * @param height The height of the destination rectangle */ - void copyRectToSurface(const void *buffer, int pitch, int destX, int destY, int width, int height); + void copyRectToSurface(const void *buffer, int srcPitch, int destX, int destY, int width, int height); /** * Copies a bitmap to the Surface internal buffer. The pixel format * of buffer must match the pixel format of the Surface. |