[Scummvm-cvs-logs] scummvm master -> 433429dcf4075df7bc892e36d8a37680ad4f41d8
dhewg
dhewg at wiibrew.org
Sun Mar 6 11:51:30 CET 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:
433429dcf4 ANDROID: Fix warning
Commit: 433429dcf4075df7bc892e36d8a37680ad4f41d8
https://github.com/scummvm/scummvm/commit/433429dcf4075df7bc892e36d8a37680ad4f41d8
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-05T14:56:25-08:00
Commit Message:
ANDROID: Fix warning
Changed paths:
backends/platform/android/texture.cpp
backends/platform/android/texture.h
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 7f3db05..ee41d3a 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<int>(w) * _bytesPerPixel == pitch) {
+ if (static_cast<int>(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<const byte *>(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 c149253..f2c79d4 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);
More information about the Scummvm-git-logs
mailing list