aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authordhewg2011-03-17 18:56:22 +0100
committerdhewg2011-03-17 19:35:58 +0100
commitf4fd9e8b504a2e49fbd67d288e591377c466760c (patch)
treef548de077e29825b9d847dff1b453e6cb1d5eed6 /backends
parent23213d23dc51d158321ce22c4cefddf771a3a36f (diff)
downloadscummvm-rg350-f4fd9e8b504a2e49fbd67d288e591377c466760c.tar.gz
scummvm-rg350-f4fd9e8b504a2e49fbd67d288e591377c466760c.tar.bz2
scummvm-rg350-f4fd9e8b504a2e49fbd67d288e591377c466760c.zip
ANDROID: Fix cursor visibility
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/android/gfx.cpp8
-rw-r--r--backends/platform/android/texture.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index ec98c35f42..8a03a19fee 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -477,7 +477,7 @@ void OSystem_Android::updateScreen() {
GLCALL(_overlay_texture->drawTextureRect());
}
- if (_show_mouse) {
+ if (_show_mouse && !_mouse_texture->isEmpty()) {
GLCALL(glPushMatrix());
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);
}
- if (w == 0 || h == 0) {
- _show_mouse = false;
+ if (w == 0 || h == 0)
return;
- }
if (_mouse_texture == _mouse_texture_palette) {
_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;
- _show_mouse = false;
+ _mouse_texture->allocBuffer(0, 0);
return;
}
diff --git a/backends/platform/android/texture.h b/backends/platform/android/texture.h
index 64489da0a4..925418721b 100644
--- a/backends/platform/android/texture.h
+++ b/backends/platform/android/texture.h
@@ -98,6 +98,10 @@ public:
return _surface.pitch;
}
+ inline bool isEmpty() const {
+ return _surface.w == 0 || _surface.h == 0;
+ }
+
inline const Graphics::Surface *surface_const() const {
return &_surface;
}