diff options
author | Kostas Nakos | 2009-02-21 19:01:34 +0000 |
---|---|---|
committer | Kostas Nakos | 2009-02-21 19:01:34 +0000 |
commit | 798a795b5ed78b1ae4817d8e49bb281d65ad921b (patch) | |
tree | 8c280a7db7f3f3c5f370b355f8e3fb75b95cfed3 /backends/platform | |
parent | c5e00f3de2f52db870b329fecdc22dd5149b6553 (diff) | |
download | scummvm-rg350-798a795b5ed78b1ae4817d8e49bb281d65ad921b.tar.gz scummvm-rg350-798a795b5ed78b1ae4817d8e49bb281d65ad921b.tar.bz2 scummvm-rg350-798a795b5ed78b1ae4817d8e49bb281d65ad921b.zip |
proper fix for random crashes with vga devices
svn-id: r38726
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 3e1a418298..e92f7549d7 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -1698,6 +1698,7 @@ void OSystem_WINCE3::internUpdateScreen() { // It can be drawn, scale it uint32 srcPitch, dstPitch; SDL_Surface *toolbarSurface; + ScalerProc *toolbarScaler; if (_videoMode.screenHeight > 240) { if (!_toolbarHighDrawn) { @@ -1723,7 +1724,15 @@ void OSystem_WINCE3::internUpdateScreen() { SDL_LockSurface(_hwscreen); srcPitch = toolbarSurface->pitch; dstPitch = _hwscreen->pitch; - Normal2x((byte *)toolbarSurface->pixels, srcPitch, (byte *)_hwscreen->pixels + (_toolbarHandler.getOffset() * _scaleFactorYm / _scaleFactorYd * dstPitch), dstPitch, toolbar_rect[0].w, toolbar_rect[0].h); + + toolbarScaler = _scalerProc; + if (_videoMode.scaleFactor == 2) + toolbarScaler = Normal2x; + else if (_videoMode.scaleFactor == 3) + toolbarScaler = Normal3x; + toolbarScaler((byte *)toolbarSurface->pixels, srcPitch, + (byte *)_hwscreen->pixels + (_toolbarHandler.getOffset() * _scaleFactorYm / _scaleFactorYd * dstPitch), + dstPitch, toolbar_rect[0].w, toolbar_rect[0].h); SDL_UnlockSurface(toolbarSurface); SDL_UnlockSurface(_hwscreen); |