aboutsummaryrefslogtreecommitdiff
path: root/sdl.cpp
diff options
context:
space:
mode:
authorMax Horn2002-05-09 19:43:07 +0000
committerMax Horn2002-05-09 19:43:07 +0000
commitebbe5b4ae41ee0d9c60903d448e6b9a2b171b620 (patch)
tree9fa6a616bc2ed79239e4fa260ca8db75668f0627 /sdl.cpp
parent5d74c6fb860325456541d51960c462491341bed7 (diff)
downloadscummvm-rg350-ebbe5b4ae41ee0d9c60903d448e6b9a2b171b620.tar.gz
scummvm-rg350-ebbe5b4ae41ee0d9c60903d448e6b9a2b171b620.tar.bz2
scummvm-rg350-ebbe5b4ae41ee0d9c60903d448e6b9a2b171b620.zip
fixed stupid bug in my optimized mouse code
svn-id: r4258
Diffstat (limited to 'sdl.cpp')
-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