[Scummvm-cvs-logs] scummvm master -> 905d5e76b463870fba69d6683c96ac93d6fda623

dhewg dhewg at wiibrew.org
Mon Mar 7 23:59:48 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:
e71fb5b0eb ANDROID: Move the overlay initialization
905d5e76b4 ANDROID: Move misplaced assert


Commit: e71fb5b0eb9c9c68bf328d557f09a3191e0c8b8f
    https://github.com/scummvm/scummvm/commit/e71fb5b0eb9c9c68bf328d557f09a3191e0c8b8f
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-07T14:42:20-08:00

Commit Message:
ANDROID: Move the overlay initialization

There's no point in doing that in initSize() every time

Changed paths:
    backends/platform/android/android.cpp
    backends/platform/android/android.h
    backends/platform/android/gfx.cpp



diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 0cfe7c9..2be435c 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -333,6 +333,8 @@ void OSystem_Android::initBackend() {
 	_mouse_texture_palette = new GLESPalette8888Texture();
 	_mouse_texture = _mouse_texture_palette;
 
+	initOverlay();
+
 	// renice this thread to boost the audio thread
 	if (setpriority(PRIO_PROCESS, 0, 19) < 0)
 		warning("couldn't renice the main thread");
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 5c7154a..f6406c4 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -146,6 +146,8 @@ private:
 	void deinitSurface();
 	void initViewport();
 
+	void initOverlay();
+
 #ifdef USE_RGB_COLOR
 	Common::String getPixelFormatName(const Graphics::PixelFormat &format) const;
 	void initTexture(GLESTexture **texture, uint width, uint height,
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 90b1c3e..6422a28 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -169,8 +169,10 @@ void OSystem_Android::initSurface() {
 	if (_game_texture)
 		_game_texture->reinit();
 
-	if (_overlay_texture)
+	if (_overlay_texture) {
 		_overlay_texture->reinit();
+		initOverlay();
+	}
 
 	if (_mouse_texture)
 		_mouse_texture->reinit();
@@ -233,12 +235,7 @@ void OSystem_Android::initViewport() {
 	clearFocusRectangle();
 }
 
-void OSystem_Android::initSize(uint width, uint height,
-								const Graphics::PixelFormat *format) {
-	ENTER("%d, %d, %p", width, height, format);
-
-	GLTHREADCHECK;
-
+void OSystem_Android::initOverlay() {
 	int overlay_width = _egl_surface_width;
 	int overlay_height = _egl_surface_height;
 
@@ -256,6 +253,13 @@ void OSystem_Android::initSize(uint width, uint height,
 	LOGI("overlay size is %ux%u", overlay_width, overlay_height);
 
 	_overlay_texture->allocBuffer(overlay_width, overlay_height);
+}
+
+void OSystem_Android::initSize(uint width, uint height,
+								const Graphics::PixelFormat *format) {
+	ENTER("%d, %d, %p", width, height, format);
+
+	GLTHREADCHECK;
 
 #ifdef USE_RGB_COLOR
 	initTexture(&_game_texture, width, height, format, false);


Commit: 905d5e76b463870fba69d6683c96ac93d6fda623
    https://github.com/scummvm/scummvm/commit/905d5e76b463870fba69d6683c96ac93d6fda623
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-07T14:42:20-08:00

Commit Message:
ANDROID: Move misplaced assert

Leftover from the recently introduced 16bit support

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



diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 6422a28..605f4eb 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -577,8 +577,6 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
 
 	GLTHREADCHECK;
 
-	assert(keycolor < 256);
-
 #ifdef USE_RGB_COLOR
 	if (format && format->bytesPerPixel > 1) {
 		if (_mouse_texture != _mouse_texture_rgb)
@@ -600,6 +598,8 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
 	_mouse_texture->allocBuffer(w, h);
 
 	if (_mouse_texture == _mouse_texture_palette) {
+		assert(keycolor < 256);
+
 		// Update palette alpha based on keycolor
 		byte *palette = _mouse_texture_palette->palette();
 






More information about the Scummvm-git-logs mailing list