diff options
author | Johannes Schickel | 2008-11-14 22:08:10 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-11-14 22:08:10 +0000 |
commit | 5a0556f09ca89886fda55d333745a672ea14e022 (patch) | |
tree | 698d0162a6737c298f8c6d313209e18a056f7684 /engines/kyra/screen.cpp | |
parent | bb87d39424c9dee6fbfddf8b806a5675bcf39494 (diff) | |
download | scummvm-rg350-5a0556f09ca89886fda55d333745a672ea14e022.tar.gz scummvm-rg350-5a0556f09ca89886fda55d333745a672ea14e022.tar.bz2 scummvm-rg350-5a0556f09ca89886fda55d333745a672ea14e022.zip |
Committed my patch #2123680 "SDL: Backend transaction / rollback support".
svn-id: r35062
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r-- | engines/kyra/screen.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 0b859f5032..0076739abe 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -186,24 +186,26 @@ void Screen::setResolution() { byte palette[4*256]; _system->grabPalette(palette, 0, 256); + int width = 320, height = 200; + bool defaultTo1xScaler = false; + if (_vm->gameFlags().useHiResOverlay) { - _system->beginGFXTransaction(); - if (_debugEnabled) - _system->initSize(960, 400); - else - _system->initSize(640, 400); - initCommonGFX(true); - _system->endGFXTransaction(); + defaultTo1xScaler = true; + height = 400; + + if (_debugEnabled) + width = 960; + else + width = 640; } else { - _system->beginGFXTransaction(); - if (_debugEnabled) - _system->initSize(640, 200); - else - _system->initSize(320, 200); - initCommonGFX(false); - _system->endGFXTransaction(); + if (_debugEnabled) + width = 640; + else + width = 320; } + initGraphics(width, height, defaultTo1xScaler); + _system->setPalette(palette, 0, 256); } |