From 8b73e6a7dae1326bb5a56301462e8bc70e5b072b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 16 Apr 2005 13:09:34 +0000 Subject: _screenHasChanged == true implies _canvas.pixels == null; so replace it (after all, we don't want to draw text when the canvas is not yet ready, no matter whether this is due to a screen change or for any other reason) svn-id: r17624 --- gui/about.cpp | 5 +---- gui/about.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'gui') diff --git a/gui/about.cpp b/gui/about.cpp index a659392194..1f9043a07c 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -121,7 +121,6 @@ void AboutDialog::open() { _modifiers = 0; _willClose = false; _canvas.pixels = NULL; - _screenHasChanged = false; Dialog::open(); } @@ -139,7 +138,6 @@ void AboutDialog::drawDialog() { // static background for the remainder of the credits. g_gui.blendRect(_x, _y, _w, _h, g_gui._bgcolor); g_gui.copyToSurface(&_canvas, _x, _y, _w, _h); - _screenHasChanged = false; } g_gui.drawSurface(_canvas, _x, _y); @@ -216,7 +214,7 @@ void AboutDialog::drawDialog() { void AboutDialog::handleTickle() { // We're in the process of doing a full redraw. This will be used as // background for the text, so we don't want any text on it. - if (_screenHasChanged) + if (!_canvas.pixels) return; const uint32 t = getMillis(); @@ -246,7 +244,6 @@ void AboutDialog::handleScreenChanged() { // Until we have a new canvas, don't draw any credits text. free(_canvas.pixels); _canvas.pixels = NULL; - _screenHasChanged = true; draw(); } diff --git a/gui/about.h b/gui/about.h index 89cb61df22..65dbb49f40 100644 --- a/gui/about.h +++ b/gui/about.h @@ -37,7 +37,6 @@ protected: byte _modifiers; bool _willClose; Graphics::Surface _canvas; - bool _screenHasChanged; public: AboutDialog(); -- cgit v1.2.3