diff options
author | Matthew Hoops | 2010-02-05 04:16:12 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-02-05 04:16:12 +0000 |
commit | 3b6f6bfbd84dbdd6f3a134ecce470835bc6ba446 (patch) | |
tree | 1e9d9ed155dd50bd84be8f71554f5c9ff83d3b99 /engines | |
parent | 19d3f5ad9b9af7b1f03db35ca97aefef9010acf4 (diff) | |
download | scummvm-rg350-3b6f6bfbd84dbdd6f3a134ecce470835bc6ba446.tar.gz scummvm-rg350-3b6f6bfbd84dbdd6f3a134ecce470835bc6ba446.tar.bz2 scummvm-rg350-3b6f6bfbd84dbdd6f3a134ecce470835bc6ba446.zip |
SCI2 Windows games are scaled from 320x200 to 640x480, not 640x400. Aspect ratio correction will eventually have to be applied. This fixes a possible segfault when playing the credits video in GK1 (which is 640x480).
svn-id: r47895
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/screen.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 04184cee09..207c459687 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -37,15 +37,22 @@ GfxScreen::GfxScreen(ResourceManager *resMan, int16 width, int16 height, bool up _resMan(resMan), _width(width), _height(height), _upscaledHires(upscaledHires) { _pixels = _width * _height; - _displayWidth = _width; _displayHeight = _height; + if (_upscaledHires) { _displayWidth *= 2; _displayHeight *= 2; + +#ifdef ENABLE_SCI32 + // SCI32 also corrects the aspect ratio when upscaling the resolution. + // This is especially needed in GK1, as the credits video is 640x480. + if (getSciVersion() >= SCI_VERSION_2) + _displayHeight = _displayHeight * 6 / 5; +#endif } - _displayPixels = _displayWidth * _displayHeight; + _displayPixels = _displayWidth * _displayHeight; _visualScreen = (byte *)calloc(_pixels, 1); _priorityScreen = (byte *)calloc(_pixels, 1); _controlScreen = (byte *)calloc(_pixels, 1); |