From 1c999792f947bf983b4d08622026eb620f5b892c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 21 Oct 2002 22:25:52 +0000 Subject: fixed stupid bug by me, again (see also 9th of May) svn-id: r5225 --- backends/sdl/sdl-common.cpp | 6 +++--- backends/sdl/sdl.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'backends/sdl') diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp index f2e91b5a05..09f235035d 100644 --- a/backends/sdl/sdl-common.cpp +++ b/backends/sdl/sdl-common.cpp @@ -749,6 +749,9 @@ void OSystem_SDL_Common::draw_mouse() { if (SDL_LockSurface(_screen) == -1) error("SDL_LockSurface failed: %s.\n", SDL_GetError()); + + // Mark as dirty + add_dirty_rect(x, y, w, h); dst = (byte *)_screen->pixels + y * _screenWidth + x; while (h > 0) { @@ -768,9 +771,6 @@ void OSystem_SDL_Common::draw_mouse() { } SDL_UnlockSurface(_screen); - - // Mark as dirty - add_dirty_rect(x, y, w, h); // Finally, set the flag to indicate the mouse has been drawn _mouseDrawn = true; diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 8fb6df31b9..4226a41ed5 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -137,6 +137,9 @@ void OSystem_SDL_Normal::draw_mouse() { if (SDL_LockSurface(sdl_tmpscreen) == -1) error("SDL_LockSurface failed: %s.\n", SDL_GetError()); + // Mark as dirty + add_dirty_rect(x, y, w, h); + dst = (uint16 *)sdl_tmpscreen->pixels + (y+1) * TMP_SCREEN_WIDTH + (x+1); while (h > 0) { int width = w; @@ -156,9 +159,6 @@ void OSystem_SDL_Normal::draw_mouse() { SDL_UnlockSurface(sdl_tmpscreen); - // Mark as dirty - add_dirty_rect(x, y, w, h); - // Finally, set the flag to indicate the mouse has been drawn _mouseDrawn = true; } -- cgit v1.2.3