From 311413a0913a8002d50aebf643dc3934357d3af4 Mon Sep 17 00:00:00 2001 From: matthijs Date: Tue, 7 Feb 2012 10:27:48 +0000 Subject: (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. --- src/video/sdl_v.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/video') diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index d22ad512e..663de4ebf 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -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; } -- cgit v1.2.3-54-g00ecf