[Scummvm-cvs-logs] scummvm master -> 90fa5087dc884aa2646cee4024631e62fffbe74b

dhewg dhewg at wiibrew.org
Sat Feb 19 23:25:32 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:
6c123974c0 ANDROID: Fix cursor when hotspot coords > 0
90fa5087dc ANDROID: Fix cursor scaling


Commit: 6c123974c0537609318583ffe23da386129eb6ea
    https://github.com/scummvm/scummvm/commit/6c123974c0537609318583ffe23da386129eb6ea
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-02-19T14:24:59-08:00

Commit Message:
ANDROID: Fix cursor when hotspot coords > 0

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



diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 38bc94e..21f41b5 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -818,10 +818,6 @@ void OSystem_Android::updateScreen() {
 	if (_show_mouse) {
 		GLCALL(glPushMatrix());
 
-		GLCALL(glTranslatex(-_mouse_hotspot.x << 16,
-							-_mouse_hotspot.y << 16,
-							0));
-
 		// Scale up ScummVM -> OpenGL (pixel) coordinates
 		int texwidth, texheight;
 
@@ -837,6 +833,10 @@ void OSystem_Android::updateScreen() {
 						xdiv(_egl_surface_height, texheight),
 						1 << 16));
 
+		GLCALL(glTranslatex(-_mouse_hotspot.x << 16,
+							-_mouse_hotspot.y << 16,
+							0));
+
 		// Note the extra half texel to position the mouse in
 		// the middle of the x,y square:
 		const Common::Point& mouse = getEventManager()->getMousePos();


Commit: 90fa5087dc884aa2646cee4024631e62fffbe74b
    https://github.com/scummvm/scummvm/commit/90fa5087dc884aa2646cee4024631e62fffbe74b
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-02-19T14:25:05-08:00

Commit Message:
ANDROID: Fix cursor scaling

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



diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 21f41b5..c49745f 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -809,7 +809,12 @@ void OSystem_Android::updateScreen() {
 		GLCALL(glPopMatrix());
 	}
 
+	int cs = _mouse_targetscale;
+
 	if (_show_overlay) {
+		// ugly, but the modern theme sets a wacko factor, only god knows why
+		cs = 1;
+
 		GLCALL(_overlay_texture->drawTexture(0, 0,
 												_egl_surface_width,
 												_egl_surface_height));
@@ -833,8 +838,8 @@ void OSystem_Android::updateScreen() {
 						xdiv(_egl_surface_height, texheight),
 						1 << 16));
 
-		GLCALL(glTranslatex(-_mouse_hotspot.x << 16,
-							-_mouse_hotspot.y << 16,
+		GLCALL(glTranslatex((-_mouse_hotspot.x * cs) << 16,
+							(-_mouse_hotspot.y * cs) << 16,
 							0));
 
 		// Note the extra half texel to position the mouse in
@@ -843,10 +848,7 @@ void OSystem_Android::updateScreen() {
 		GLCALL(glTranslatex((mouse.x << 16) | 1 << 15,
 							(mouse.y << 16) | 1 << 15, 0));
 
-		// Mouse targetscale just seems to make the cursor way
-		// too big :/
-		//GLCALL(glScalex(_mouse_targetscale << 16, _mouse_targetscale << 16,
-		//					1 << 16));
+		GLCALL(glScalex(cs << 16, cs << 16, 1 << 16));
 
 		_mouse_texture->drawTexture();
 






More information about the Scummvm-git-logs mailing list