diff options
author | Kostas Nakos | 2009-08-06 18:05:50 +0000 |
---|---|---|
committer | Kostas Nakos | 2009-08-06 18:05:50 +0000 |
commit | b395b1836a8259edeaf6b2c9260b4186dee51796 (patch) | |
tree | df3277edd1e5a23892b4c3b046198c9679c2acaf /backends/platform/wince | |
parent | 8820b6166ecc5f2c76e926aefdbf4d3ad6f2f062 (diff) | |
download | scummvm-rg350-b395b1836a8259edeaf6b2c9260b4186dee51796.tar.gz scummvm-rg350-b395b1836a8259edeaf6b2c9260b4186dee51796.tar.bz2 scummvm-rg350-b395b1836a8259edeaf6b2c9260b4186dee51796.zip |
overload showMouse to kill mouse shadows in kyra
svn-id: r43088
Diffstat (limited to 'backends/platform/wince')
-rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 20 | ||||
-rw-r--r-- | backends/platform/wince/wince-sdl.h | 1 |
2 files changed, 18 insertions, 3 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 5d75b76805..3ee61bc98d 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1934,8 +1934,7 @@ void OSystem_WINCE3::setMouseCursor(const byte *buf, uint w, uint h, int hotspot _mouseData = (byte *) malloc(w * h); memcpy(_mouseData, buf, w * h); - if (w > _mouseBackupDim || h > _mouseBackupDim) - { + if (w > _mouseBackupDim || h > _mouseBackupDim) { // mouse has been undrawn, adjust sprite backup area free(_mouseBackupOld); free(_mouseBackupToolbar); @@ -2050,7 +2049,6 @@ void OSystem_WINCE3::undrawMouse() { if (_mouseNeedsRedraw) return; - _mouseNeedsRedraw = true; int old_mouse_x = _mouseCurState.x - _mouseHotspotX; int old_mouse_y = _mouseCurState.y - _mouseHotspotY; @@ -2101,6 +2099,22 @@ void OSystem_WINCE3::undrawMouse() { addDirtyRect(old_mouse_x, old_mouse_y, old_mouse_w, old_mouse_h); SDL_UnlockSurface(_overlayVisible ? _overlayscreen : _screen); + + _mouseNeedsRedraw = true; +} + +bool OSystem_WINCE3::showMouse(bool visible) { + if (_mouseVisible == visible) + return visible; + + if (visible == false) + undrawMouse(); + + bool last = _mouseVisible; + _mouseVisible = visible; + _mouseNeedsRedraw = true; + + return last; } void OSystem_WINCE3::drawToolbarMouse(SDL_Surface *surf, bool draw) { diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h index cc2948f93d..deafde6d80 100644 --- a/backends/platform/wince/wince-sdl.h +++ b/backends/platform/wince/wince-sdl.h @@ -94,6 +94,7 @@ public: void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor, int cursorTargetScale); // overloaded by CE backend void undrawMouse(); void blitCursor(); + bool showMouse(bool visible); void setMousePos(int x, int y); void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); |