mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 17:21:19 +00:00
fix bug #13758 - logo not being redrawn on the loading screen
This commit is contained in:
parent
958d838f76
commit
2b51e68e4e
@ -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:
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user