From 1b0d4724f4526e1fccec3d457be72eb911908a90 Mon Sep 17 00:00:00 2001 From: dhewg Date: Fri, 4 Mar 2011 21:22:16 +0100 Subject: ANDROID: Fix slightly off while loop CursorMan allows to push cursors with a width/height of zero. If such a cursor is restored, we don't need to call glTexSubImage2D() 0xffffffff times... This fixes delays of multiple minutes when closing GMM on groovie and sword. Also, I want that last hour of my life back. --- backends/platform/android/gfx.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 31e8c4be18..e0994b1d60 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -485,6 +485,9 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h, palette = _mouse_texture->palette(); palette[keycolor * 4 + 3] = 0x00; + if (w == 0 || h == 0) + return; + _mouse_texture->updateBuffer(0, 0, w, h, buf, w); _mouse_hotspot = Common::Point(hotspotX, hotspotY); -- cgit v1.2.3