- 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
This commit is contained in:
Johannes Schickel 2009-02-26 02:04:30 +00:00
parent 522063b28c
commit 28d1fdcf24

View file

@ -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);