aboutsummaryrefslogtreecommitdiff
path: root/gui/newgui.cpp
diff options
context:
space:
mode:
authorMax Horn2005-04-17 11:20:59 +0000
committerMax Horn2005-04-17 11:20:59 +0000
commit919af98314473eadd139b1949e353342e4b6a508 (patch)
tree958f2d5fb96c0dac590491326ebbb6b8b98430fa /gui/newgui.cpp
parent9daddf595570e536e622f1b85274e40401da66c2 (diff)
downloadscummvm-rg350-919af98314473eadd139b1949e353342e4b6a508.tar.gz
scummvm-rg350-919af98314473eadd139b1949e353342e4b6a508.tar.bz2
scummvm-rg350-919af98314473eadd139b1949e353342e4b6a508.zip
Added Dialog::wantsScaling(), to allow dialogs to turn off automatic scaling
svn-id: r17646
Diffstat (limited to 'gui/newgui.cpp')
-rw-r--r--gui/newgui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 59f7149123..a9b6070efc 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -106,6 +106,7 @@ void NewGui::runLoop() {
// EVENT_SCREEN_CHANGED is received. However, not yet all backends support
// that event, so we also do it "manually" whenever a run loop is entered.
updateColors();
+ _scaleEnable = activeDialog->wantsScaling();
updateScaleFactor();
if (!_stateIsSaved) {
@@ -121,8 +122,13 @@ void NewGui::runLoop() {
// This is necessary to get the blending right.
_system->clearOverlay();
_system->grabOverlay((OverlayColor *)_screen.pixels, _screenPitch);
- for (int i = 0; i < _dialogStack.size(); i++)
+ for (int i = 0; i < _dialogStack.size(); i++) {
+ // For each dialog we draw we have to ensure the correct
+ // scaling mode is active.
+ _scaleEnable = _dialogStack[i]->wantsScaling();
+ updateScaleFactor();
_dialogStack[i]->drawDialog();
+ }
_needRedraw = false;
}