From 433429dcf4075df7bc892e36d8a37680ad4f41d8 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 5 Mar 2011 23:55:16 +0100 Subject: ANDROID: Fix warning --- backends/platform/android/texture.cpp | 14 +++++++------- backends/platform/android/texture.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp index 7f3db0574b..ee41d3aeee 100644 --- a/backends/platform/android/texture.cpp +++ b/backends/platform/android/texture.cpp @@ -166,15 +166,15 @@ void GLESTexture::allocBuffer(GLuint w, GLuint h) { } void GLESTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h, - const void *buf, int pitch) { - ENTER("%u, %u, %u, %u, %p, %d", x, y, w, h, buf, pitch); + const void *buf, int pitch_buf) { + ENTER("%u, %u, %u, %u, %p, %d", x, y, w, h, buf, pitch_buf); GLCALL(glBindTexture(GL_TEXTURE_2D, _texture_name)); GLCALL(glPixelStorei(GL_UNPACK_ALIGNMENT, 1)); setDirtyRect(Common::Rect(x, y, x + w, y + h)); - if (static_cast(w) * _bytesPerPixel == pitch) { + if (static_cast(w) * _bytesPerPixel == pitch_buf) { GLCALL(glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, _glFormat, _glType, buf)); } else { @@ -191,7 +191,7 @@ void GLESTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h, do { memcpy(dst, src, w * _bytesPerPixel); dst += w * _bytesPerPixel; - src += pitch; + src += pitch_buf; } while (--count); GLCALL(glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, @@ -206,7 +206,7 @@ void GLESTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h, GLCALL(glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, 1, _glFormat, _glType, src)); ++y; - src += pitch; + src += pitch_buf; } while (--h); #endif } @@ -359,7 +359,7 @@ void GLESPaletteTexture::fillBuffer(uint32 color) { void GLESPaletteTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h, - const void *buf, int pitch) { + const void *buf, int pitch_buf) { _all_dirty = true; const byte * src = static_cast(buf); @@ -368,7 +368,7 @@ void GLESPaletteTexture::updateBuffer(GLuint x, GLuint y, do { memcpy(dst, src, w * _bytesPerPixel); dst += _surface.pitch; - src += pitch; + src += pitch_buf; } while (--h); } diff --git a/backends/platform/android/texture.h b/backends/platform/android/texture.h index c149253dd4..f2c79d4007 100644 --- a/backends/platform/android/texture.h +++ b/backends/platform/android/texture.h @@ -54,7 +54,7 @@ public: virtual void allocBuffer(GLuint width, GLuint height); virtual void updateBuffer(GLuint x, GLuint y, GLuint width, GLuint height, - const void *buf, int pitch); + const void *buf, int pitch_buf); virtual void fillBuffer(uint32 color); virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h); @@ -167,7 +167,7 @@ public: virtual void allocBuffer(GLuint width, GLuint height); virtual void updateBuffer(GLuint x, GLuint y, GLuint width, GLuint height, - const void *buf, int pitch); + const void *buf, int pitch_buf); virtual void fillBuffer(uint32 color); virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h); -- cgit v1.2.3