aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sdl.cpp4
1 files 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