ANDROID: Fix cursor visibility
This commit is contained in:
parent
23213d23dc
commit
f4fd9e8b50
2 changed files with 7 additions and 5 deletions
|
@ -477,7 +477,7 @@ void OSystem_Android::updateScreen() {
|
||||||
GLCALL(_overlay_texture->drawTextureRect());
|
GLCALL(_overlay_texture->drawTextureRect());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_show_mouse) {
|
if (_show_mouse && !_mouse_texture->isEmpty()) {
|
||||||
GLCALL(glPushMatrix());
|
GLCALL(glPushMatrix());
|
||||||
|
|
||||||
const Common::Point &mouse = getEventManager()->getMousePos();
|
const Common::Point &mouse = getEventManager()->getMousePos();
|
||||||
|
@ -710,10 +710,8 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
|
||||||
WRITE_UINT16(_mouse_texture_palette->palette() + keycolor * 2, 0);
|
WRITE_UINT16(_mouse_texture_palette->palette() + keycolor * 2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w == 0 || h == 0) {
|
if (w == 0 || h == 0)
|
||||||
_show_mouse = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (_mouse_texture == _mouse_texture_palette) {
|
if (_mouse_texture == _mouse_texture_palette) {
|
||||||
_mouse_texture->updateBuffer(0, 0, w, h, buf, w);
|
_mouse_texture->updateBuffer(0, 0, w, h, buf, w);
|
||||||
|
@ -730,7 +728,7 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h,
|
||||||
|
|
||||||
delete[] tmp;
|
delete[] tmp;
|
||||||
|
|
||||||
_show_mouse = false;
|
_mouse_texture->allocBuffer(0, 0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,10 @@ public:
|
||||||
return _surface.pitch;
|
return _surface.pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool isEmpty() const {
|
||||||
|
return _surface.w == 0 || _surface.h == 0;
|
||||||
|
}
|
||||||
|
|
||||||
inline const Graphics::Surface *surface_const() const {
|
inline const Graphics::Surface *surface_const() const {
|
||||||
return &_surface;
|
return &_surface;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue