diff options
author | Johannes Schickel | 2009-02-26 02:04:30 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-02-26 02:04:30 +0000 |
commit | 28d1fdcf24861485bbbd7ae537fdf13c6da721e4 (patch) | |
tree | 2a40df54cb46dbed614547f5366d44939b1dea8d /backends/platform | |
parent | 522063b28cf3afe2fcdd5539d6769986d0babb00 (diff) | |
download | scummvm-rg350-28d1fdcf24861485bbbd7ae537fdf13c6da721e4.tar.gz scummvm-rg350-28d1fdcf24861485bbbd7ae537fdf13c6da721e4.tar.bz2 scummvm-rg350-28d1fdcf24861485bbbd7ae537fdf13c6da721e4.zip |
- Fix cursor drawing bug on (cursor) palette change
- Fix cursor drawing when it was hidden before and no dirty rects are present
- Diese und die folgenden Zeilen werden ignoriert --
M sdl/graphics.cpp
svn-id: r38890
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index cd8b91a8e2..879537f2cd 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -667,8 +667,7 @@ void OSystem_SDL::internUpdateScreen() { } // Only draw anything if necessary - if (_numDirtyRects > 0) { - + if (_numDirtyRects > 0 || _mouseNeedsRedraw) { SDL_Rect *r; SDL_Rect dst; uint32 srcPitch, dstPitch; @@ -744,7 +743,6 @@ void OSystem_SDL::internUpdateScreen() { _numDirtyRects = 0; _forceFull = false; - _mouseNeedsRedraw = false; } bool OSystem_SDL::saveScreenshot(const char *filename) { @@ -1315,7 +1313,6 @@ void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, if (w == 0 || h == 0) return; - _mouseNeedsRedraw = true; _mouseCurState.hotX = hotspot_x; _mouseCurState.hotY = hotspot_y; @@ -1361,6 +1358,8 @@ void OSystem_SDL::blitCursor() { if (!_mouseOrigSurface || !_mouseData) return; + _mouseNeedsRedraw = true; + w = _mouseCurState.w; h = _mouseCurState.h; @@ -1531,9 +1530,8 @@ void OSystem_SDL::undrawMouse() { // When we switch bigger overlay off mouse jumps. Argh! // This is intended to prevent undrawing offscreen mouse - if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight)) { + if (!_overlayVisible && (x >= _videoMode.screenWidth || y >= _videoMode.screenHeight)) return; - } if (_mouseBackup.w != 0 && _mouseBackup.h != 0) addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h); |