aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2005-04-16 13:09:34 +0000
committerMax Horn2005-04-16 13:09:34 +0000
commit8b73e6a7dae1326bb5a56301462e8bc70e5b072b (patch)
tree6dbf05be4d5c4bce76a8e32831fbe05250f06a37 /gui
parenta804152443dc4215625de52f6d81f5e394517465 (diff)
downloadscummvm-rg350-8b73e6a7dae1326bb5a56301462e8bc70e5b072b.tar.gz
scummvm-rg350-8b73e6a7dae1326bb5a56301462e8bc70e5b072b.tar.bz2
scummvm-rg350-8b73e6a7dae1326bb5a56301462e8bc70e5b072b.zip
_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
Diffstat (limited to 'gui')
-rw-r--r--gui/about.cpp5
-rw-r--r--gui/about.h1
2 files changed, 1 insertions, 5 deletions
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();