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:
parent
12a561f119
commit
1b0d4724f4
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue