diff options
author | Robin Watts | 2009-07-27 16:29:36 +0000 |
---|---|---|
committer | Robin Watts | 2009-07-27 16:29:36 +0000 |
commit | 816bd9a7ea4f99aaae67c6e82f686b88dd8c728f (patch) | |
tree | e25ba1c5d434a52731dbbafff0474ad8948a155d /backends/platform/wince | |
parent | ed763cccfe57774b803e0ae32606d7ec677b297b (diff) | |
download | scummvm-rg350-816bd9a7ea4f99aaae67c6e82f686b88dd8c728f.tar.gz scummvm-rg350-816bd9a7ea4f99aaae67c6e82f686b88dd8c728f.tar.bz2 scummvm-rg350-816bd9a7ea4f99aaae67c6e82f686b88dd8c728f.zip |
Add ARM code version of Normal2x scaler.
Add ARM only aspect ratio correcting version of Normal2x scaler.
Make WinCE port use Normal2x by default if the screen is large enough.
Make WinCE port use aspect ratio correcting version if panel is hidden.
svn-id: r42843
Diffstat (limited to 'backends/platform/wince')
-rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 70 |
1 files changed, 62 insertions, 8 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 8b2e0848f8..47d9597f4f 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1147,10 +1147,69 @@ void OSystem_WINCE3::setGraphicsModeIntern() { } bool OSystem_WINCE3::update_scalers() { + _videoMode.aspectRatioCorrection = false; + if (_videoMode.mode != GFX_NORMAL) return false; - _videoMode.aspectRatioCorrection = false; + /* If we're on a device with a large enough screen to accomodate a + * doubled screen, double the screen. */ + if ((!_orientationLandscape) && + (_videoMode.screenWidth == 320 || !_videoMode.screenWidth) && + (getScreenWidth() >= 640) && + (getScreenHeight() >= 480)) + { +#ifdef USE_ARM_SCALER_ASM + if (!_panelVisible && !_overlayVisible && _canBeAspectScaled) + { + _scaleFactorXm = 2; + _scaleFactorXd = 1; + _scaleFactorYm = 12; + _scaleFactorYd = 5; + _scalerProc = Normal2xAspect; + _modeFlags = 0; + _videoMode.aspectRatioCorrection = true; + } + else +#endif + { + _scaleFactorXm = 2; + _scaleFactorXd = 1; + _scaleFactorYm = 2; + _scaleFactorYd = 1; + _scalerProc = Normal2x; + _modeFlags = 0; + } + return true; + } + if ((_orientationLandscape) && + (_videoMode.screenWidth == 320 || !_videoMode.screenWidth) && + (getScreenWidth() >= 480) && + (getScreenHeight() >= 640)) + { +#ifdef USE_ARM_SCALER_ASM + if (!_panelVisible && !_overlayVisible && _canBeAspectScaled) + { + _scaleFactorXm = 2; + _scaleFactorXd = 1; + _scaleFactorYm = 12; + _scaleFactorYd = 5; + _scalerProc = Normal2xAspect; + _modeFlags = 0; + _videoMode.aspectRatioCorrection = true; + } + else +#endif + { + _scaleFactorXm = 2; + _scaleFactorXd = 1; + _scaleFactorYm = 2; + _scaleFactorYd = 1; + _scalerProc = Normal2x; + _modeFlags = 0; + } + return true; + } if (CEDevice::hasPocketPCResolution()) { if ( (!_orientationLandscape && (_videoMode.screenWidth == 320 || !_videoMode.screenWidth)) @@ -1369,13 +1428,8 @@ bool OSystem_WINCE3::loadGFXMode() { // Create the surface that contains the scaled graphics in 16 bit mode // Always use full screen mode to have a "clean screen" - if (!_videoMode.aspectRatioCorrection) { - displayWidth = _videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd; - displayHeight = _videoMode.screenHeight * _scaleFactorYm / _scaleFactorYd; - } else { - displayWidth = _videoMode.screenWidth; - displayHeight = _videoMode.screenHeight; - } + displayWidth = _videoMode.screenWidth * _scaleFactorXm / _scaleFactorXd; + displayHeight = _videoMode.screenHeight * _scaleFactorYm / _scaleFactorYd; switch (_orientationLandscape) { case 1: |