diff options
author | dhewg | 2011-03-04 21:22:16 +0100 |
---|---|---|
committer | dhewg | 2011-03-04 21:35:30 +0100 |
commit | 1b0d4724f4526e1fccec3d457be72eb911908a90 (patch) | |
tree | d1ee643c0a861b68e21e89093da8de5ca4fcb292 /backends/platform/android | |
parent | 12a561f119eef769d6d37c2a099b235357138ab4 (diff) | |
download | scummvm-rg350-1b0d4724f4526e1fccec3d457be72eb911908a90.tar.gz scummvm-rg350-1b0d4724f4526e1fccec3d457be72eb911908a90.tar.bz2 scummvm-rg350-1b0d4724f4526e1fccec3d457be72eb911908a90.zip |
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.
Diffstat (limited to 'backends/platform/android')
-rw-r--r-- | backends/platform/android/gfx.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |