From ecd265b539452cfbd5eee96b5e4817dbed397d72 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sun, 13 Mar 2011 23:23:29 +0100 Subject: ANDROID: Center mouse on overlay visibility changes --- backends/platform/android/gfx.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'backends/platform/android') diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 06387e09fe..dc8acaca29 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; -- cgit v1.2.3