(svn r23910) -Fix: [SDL] Handle the SDL_VIDEOEXPOSE event.

- It seems this event is never triggered when using 1.2 (it has some
    autorefresh feature which seems to have been removed in 1.3), but in theory
    this event could also trigger on 1.2.
  - Note that this fixes redraw issues when compiling against SDL 1.3, but it
    still uses the "compatibility" rendering API using SDL_SetVideoMode and
    SDL_UpdateRects. Eventually (when 1.3 is stable and released as 2.0), this
    should probably be rewritting to use the new Windows and Renderers
    available in SDL 1.3.
This commit is contained in:
matthijs 2012-02-07 10:27:48 +00:00
parent cba6390973
commit 311413a091

View File

@ -473,6 +473,13 @@ static int PollEvent()
CreateMainSurface(w, h);
break;
}
case SDL_VIDEOEXPOSE: {
/* Force a redraw of the entire screen. Note
* that SDL 1.2 seems to do this automatically
* in most cases, but 1.3 / 2.0 does not. */
_num_dirty_rects = MAX_DIRTY_RECTS + 1;
break;
}
}
return -1;
}