[Scummvm-cvs-logs] scummvm master -> 6e4af65be1bbb7abb88bd75f5fe2f0260530f6ad

dhewg dhewg at wiibrew.org
Tue Mar 15 00:07:17 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:
7b850c18c7 ANDROID: Cleanup
6e4af65be1 ANDROID: Add missing cases to getFeatureState()


Commit: 7b850c18c7303fa06ff357cf2295e868a16ed1cf
    https://github.com/scummvm/scummvm/commit/7b850c18c7303fa06ff357cf2295e868a16ed1cf
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-14T16:05:59-07:00

Commit Message:
ANDROID: Cleanup

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 72810b6..dc8dc9d 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -534,6 +534,7 @@ bool OSystem_Android::pollEvent(Common::Event &event) {
 		}
 		break;
 	}
+
 	default:
 		break;
 	}
@@ -554,7 +555,7 @@ uint32 OSystem_Android::getMillis() {
 
 	gettimeofday(&curTime, 0);
 
-	return (uint32)(((curTime.tv_sec - _startTime.tv_sec) * 1000) + \
+	return (uint32)(((curTime.tv_sec - _startTime.tv_sec) * 1000) +
 			((curTime.tv_usec - _startTime.tv_usec) / 1000));
 }
 
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index db2cb95..dc45f06 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -229,23 +229,7 @@ public:
 									int x, int y, int w, int h);
 	virtual int16 getOverlayHeight();
 	virtual int16 getOverlayWidth();
-
-	// RGBA 4444
-	virtual Graphics::PixelFormat getOverlayFormat() const {
-		Graphics::PixelFormat format;
-
-		format.bytesPerPixel = 2;
-		format.rLoss = 8 - 4;
-		format.gLoss = 8 - 4;
-		format.bLoss = 8 - 4;
-		format.aLoss = 8 - 4;
-		format.rShift = 3 * 4;
-		format.gShift = 2 * 4;
-		format.bShift = 1 * 4;
-		format.aShift = 0 * 4;
-
-		return format;
-	}
+	virtual Graphics::PixelFormat getOverlayFormat() const;
 
 	virtual bool showMouse(bool visible);
 
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index d08cc63..65f98d5 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -449,6 +449,7 @@ void OSystem_Android::updateScreen() {
 		_game_texture->drawTextureRect();
 	} else {
 		GLCALL(glPushMatrix());
+
 		GLCALL(glScalex(xdiv(_egl_surface_width, _focus_rect.width()),
 						xdiv(_egl_surface_height, _focus_rect.height()),
 						1 << 16));
@@ -459,6 +460,7 @@ void OSystem_Android::updateScreen() {
 						1 << 16));
 
 		_game_texture->drawTextureRect();
+
 		GLCALL(glPopMatrix());
 	}
 
@@ -476,7 +478,7 @@ void OSystem_Android::updateScreen() {
 	if (_show_mouse) {
 		GLCALL(glPushMatrix());
 
-		Common::Point mouse = getEventManager()->getMousePos();
+		const Common::Point &mouse = getEventManager()->getMousePos();
 
 		// Scale up ScummVM -> OpenGL (pixel) coordinates
 		if (_show_overlay) {
@@ -659,6 +661,10 @@ int16 OSystem_Android::getOverlayWidth() {
 	return _overlay_texture->width();
 }
 
+Graphics::PixelFormat OSystem_Android::getOverlayFormat() const {
+	return _overlay_texture->getPixelFormat();
+}
+
 bool OSystem_Android::showMouse(bool visible) {
 	ENTER("%d", visible);
 


Commit: 6e4af65be1bbb7abb88bd75f5fe2f0260530f6ad
    https://github.com/scummvm/scummvm/commit/6e4af65be1bbb7abb88bd75f5fe2f0260530f6ad
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-14T16:06:00-07:00

Commit Message:
ANDROID: Add missing cases to getFeatureState()

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



diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index dc8dc9d..ddef427 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -385,6 +385,10 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) {
 
 bool OSystem_Android::getFeatureState(Feature f) {
 	switch (f) {
+	case kFeatureFullscreenMode:
+		return _fullscreen;
+	case kFeatureAspectRatioCorrection:
+		return _ar_correction;
 	case kFeatureVirtualKeyboard:
 		return _virtkeybd_on;
 	default:






More information about the Scummvm-git-logs mailing list