mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(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:
parent
cba6390973
commit
311413a091
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user