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

dhewg dhewg at wiibrew.org
Sun Mar 13 23:32:10 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:
ecd265b539 ANDROID: Center mouse on overlay visibility changes
f82121d2a2 ANDROID: Don't merge mouse move events


Commit: ecd265b539452cfbd5eee96b5e4817dbed397d72
    https://github.com/scummvm/scummvm/commit/ecd265b539452cfbd5eee96b5e4817dbed397d72
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-13T15:31:04-07:00

Commit Message:
ANDROID: Center mouse on overlay visibility changes

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



diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 06387e0..dc8acac 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -546,6 +546,13 @@ void OSystem_Android::clearFocusRectangle() {
 void OSystem_Android::showOverlay() {
 	ENTER();
 
+	Common::Event e;
+	e.type = Common::EVENT_MOUSEMOVE;
+	e.mouse.x = _egl_surface_width / 2;
+	e.mouse.y = _egl_surface_height / 2;
+
+	pushEvent(e);
+
 	_show_overlay = true;
 	_force_redraw = true;
 
@@ -555,6 +562,13 @@ void OSystem_Android::showOverlay() {
 void OSystem_Android::hideOverlay() {
 	ENTER();
 
+	Common::Event e;
+	e.type = Common::EVENT_MOUSEMOVE;
+	e.mouse.x = _egl_surface_width / 2;
+	e.mouse.y = _egl_surface_height / 2;
+
+	pushEvent(e);
+
 	_show_overlay = false;
 	_force_redraw = true;
 


Commit: f82121d2a279693f47a25e30e36c34e1e0ff21bd
    https://github.com/scummvm/scummvm/commit/f82121d2a279693f47a25e30e36c34e1e0ff21bd
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-13T15:31:07-07:00

Commit Message:
ANDROID: Don't merge mouse move events

Breaks more than it solves

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



diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 606b825..9374a87 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -540,24 +540,7 @@ bool OSystem_Android::pollEvent(Common::Event &event) {
 void OSystem_Android::pushEvent(const Common::Event& event) {
 	lockMutex(_event_queue_lock);
 
-	// Try to combine multiple queued mouse move events
-	if (event.type == Common::EVENT_MOUSEMOVE &&
-			!_event_queue.empty() &&
-			_event_queue.back().type == Common::EVENT_MOUSEMOVE) {
-		Common::Event tail = _event_queue.back();
-		if (event.kbd.flags) {
-			// relative movement hack
-			tail.mouse.x += event.mouse.x;
-			tail.mouse.y += event.mouse.y;
-		} else {
-			// absolute position, clear relative flag
-			tail.kbd.flags = 0;
-			tail.mouse.x = event.mouse.x;
-			tail.mouse.y = event.mouse.y;
-		}
-	} else {
-	  _event_queue.push(event);
-	}
+	_event_queue.push(event);
 
 	unlockMutex(_event_queue_lock);
 }






More information about the Scummvm-git-logs mailing list