Author: grzywacz
Date: Wed Jun 24 00:17:55 2009
New Revision: 36380
URL: http://svn.gna.org/viewcvs/wesnoth?rev=36380&view=rev
Log:
fix bug #13758 - logo not being redrawn on the loading screen
Modified:
trunk/changelog
trunk/src/loadscreen.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=36380&r1=36379&r2=36380&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Wed Jun 24 00:17:55 2009
@@ -37,6 +37,7 @@
* 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:
Modified: trunk/src/loadscreen.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/loadscreen.cpp?rev=36380&r1=36379&r2=36380&view=diff
==============================================================================
--- trunk/src/loadscreen.cpp (original)
+++ trunk/src/loadscreen.cpp Wed Jun 24 00:17:55 2009
@@ -27,6 +27,7 @@
#include "video.hpp"
#include "image.hpp"
+#include <SDL_events.h>
#include <SDL_image.h>
#include <cassert>
@@ -114,6 +115,15 @@
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();
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits