Author: alink
Date: Sun Jul 1 02:20:18 2007
New Revision: 18587
URL: http://svn.gna.org/viewcvs/wesnoth?rev=18587&view=rev
Log:
Abort all invalidate and drawing operations when the screen update is locked.
Because it seems to be the desired use of this lock.
Anyway, if the screen update is locked, any changes will be invisible, so no
need to do them.
Also restore a previously removed assert, because it is now again valid (yes,
you were right, Mordante)
Modified:
trunk/src/game_display.cpp
Modified: trunk/src/game_display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_display.cpp?rev=18587&r1=18586&r2=18587&view=diff
==============================================================================
--- trunk/src/game_display.cpp (original)
+++ trunk/src/game_display.cpp Sun Jul 1 02:20:18 2007
@@ -215,6 +215,10 @@
void game_display::draw(bool update,bool force)
{
+ if (screen_.update_locked()) {
+ return
+ }
+
//log_scope("Drawing");
invalidate_animations();
@@ -223,7 +227,7 @@
bool changed = display::draw_init();
//int simulate_delay = 0;
- if(!map_.empty() && !invalidated_.empty() && !screen_.update_locked()) {
+ if(!map_.empty() && !invalidated_.empty()) {
changed = true;
halo::unrender(invalidated_);
@@ -416,6 +420,7 @@
} else if (!map_.empty()) {
// if no hexes are invalidated we still need to update the
// haloes since there might be animated or expired haloes
+ wassert(invalidated_.empty());
halo::unrender(invalidated_);
halo::render();
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits