fix bug #13758 - logo not being redrawn on the loading screen

This commit is contained in:
Karol Nowak 2009-06-23 22:17:55 +00:00
parent 958d838f76
commit 2b51e68e4e
2 changed files with 11 additions and 0 deletions

View File

@ -37,6 +37,7 @@ Version 1.7.0+svn:
* Properly translate dialog title (bug #13761)
* Fixed a problem with easy close that caused buttons to be ignored
* Properly translate unit name (bug #13751)
* Properly redraw logo on the loading screen (bug #13758)
* Set window title before setting video mode (bug #13756)
Version 1.7.0:

View File

@ -27,6 +27,7 @@
#include "video.hpp"
#include "image.hpp"
#include <SDL_events.h>
#include <SDL_image.h>
#include <cassert>
@ -114,6 +115,15 @@ void loadscreen::set_progress(const int percentage, const std::string &text, con
surface const gdis = screen_.getSurface();
SDL_Rect area;
// Pump events and make sure to redraw the logo if there's a chance that it's been obscured
SDL_Event ev;
while(SDL_PollEvent(&ev)) {
if(ev.type == SDL_VIDEORESIZE || ev.type == SDL_VIDEOEXPOSE) {
logo_drawn_ = false;
}
}
// Draw logo if it was succesfully loaded.
if (!logo_surface_.null() && !logo_drawn_) {
SDL_Surface *logo = logo_surface_.get();