[Scummvm-cvs-logs] scummvm master -> c144bbf9570e6d4498072374ee24edb33b6c9126

dhewg dhewg at wiibrew.org
Fri Mar 25 00:42:47 CET 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b4a6c89662 ANDROID: Always set the surface properties
c144bbf957 SCI: Add two TODOs


Commit: b4a6c89662700b448db41d1e0c99cdf39a2dc5e0
    https://github.com/scummvm/scummvm/commit/b4a6c89662700b448db41d1e0c99cdf39a2dc5e0
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-24T16:41:01-07:00

Commit Message:
ANDROID: Always set the surface properties

Didn't happen on the shortcut, which led to wrong properties and
surface functions scribbling over memory

Changed paths:
    backends/platform/android/texture.cpp



diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 407ba04..573f8f8 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -231,6 +231,8 @@ void GLESTexture::allocBuffer(GLuint w, GLuint h) {
 
 	GLESBaseTexture::allocBuffer(w, h);
 
+	_surface.pitch = w * _pixelFormat.bytesPerPixel;
+
 	if (_surface.w == oldw && _surface.h == oldh) {
 		fillBuffer(0);
 		return;
@@ -243,7 +245,6 @@ void GLESTexture::allocBuffer(GLuint w, GLuint h) {
 	assert(_pixels);
 
 	_surface.pixels = _pixels;
-	_surface.pitch = w * _pixelFormat.bytesPerPixel;
 
 	fillBuffer(0);
 
@@ -364,6 +365,8 @@ void GLESPaletteTexture::allocBuffer(GLuint w, GLuint h) {
 
 	GLESBaseTexture::allocBuffer(w, h);
 
+	_surface.pitch = _texture_width;
+
 	if (_surface.w == oldw && _surface.h == oldh) {
 		fillBuffer(0);
 		return;
@@ -375,7 +378,6 @@ void GLESPaletteTexture::allocBuffer(GLuint w, GLuint h) {
 	assert(_texture);
 
 	_surface.pixels = _texture + _paletteSize;
-	_surface.pitch = _texture_width;
 
 	fillBuffer(0);
 
@@ -490,6 +492,9 @@ void GLESFakePaletteTexture::allocBuffer(GLuint w, GLuint h) {
 
 	GLESBaseTexture::allocBuffer(w, h);
 
+	_surface.bytesPerPixel = 1;
+	_surface.pitch = w;
+
 	if (_surface.w == oldw && _surface.h == oldh) {
 		fillBuffer(0);
 		return;
@@ -503,8 +508,6 @@ void GLESFakePaletteTexture::allocBuffer(GLuint w, GLuint h) {
 
 	// fixup surface, for the outside this is a CLUT8 surface
 	_surface.pixels = _pixels;
-	_surface.bytesPerPixel = 1;
-	_surface.pitch = w;
 
 	fillBuffer(0);
 


Commit: c144bbf9570e6d4498072374ee24edb33b6c9126
    https://github.com/scummvm/scummvm/commit/c144bbf9570e6d4498072374ee24edb33b6c9126
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-24T16:41:01-07:00

Commit Message:
SCI: Add two TODOs

Changed paths:
    engines/sci/graphics/screen.cpp



diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 89463ba..d544dad 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -156,12 +156,14 @@ void GfxScreen::copyToScreen() {
 }
 
 void GfxScreen::copyFromScreen(byte *buffer) {
+	// TODO this ignores the pitch
 	Graphics::Surface *screen = g_system->lockScreen();
 	memcpy(buffer, screen->pixels, _displayPixels);
 	g_system->unlockScreen();
 }
 
 void GfxScreen::kernelSyncWithFramebuffer() {
+	// TODO this ignores the pitch
 	Graphics::Surface *screen = g_system->lockScreen();
 	memcpy(_displayScreen, screen->pixels, _displayPixels);
 	g_system->unlockScreen();






More information about the Scummvm-git-logs mailing list