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.
This commit is contained in:
dhewg 2011-03-04 21:22:16 +01:00
parent 12a561f119
commit 1b0d4724f4

View file

@ -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);