From ebbe5b4ae41ee0d9c60903d448e6b9a2b171b620 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 9 May 2002 19:43:07 +0000 Subject: fixed stupid bug in my optimized mouse code svn-id: r4258 --- sdl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdl.cpp b/sdl.cpp index 343d559995..c0dd5cceab 100644 --- a/sdl.cpp +++ b/sdl.cpp @@ -971,6 +971,8 @@ void OSystem_SDL::draw_mouse() { if (SDL_LockSurface(sdl_screen) == -1) error("SDL_LockSurface failed: %s.\n", SDL_GetError()); + add_dirty_rect(x, y, w, h); + dst = (byte *)sdl_screen->pixels + y * SCREEN_WIDTH + x; while (h > 0) { int width = w; @@ -988,8 +990,6 @@ void OSystem_SDL::draw_mouse() { h--; } - add_dirty_rect(x, y, w, h); - SDL_UnlockSurface(sdl_screen); // Finally, set the flag to indicate the mouse has been drawn -- cgit v1.2.3