Ticket #8262: shake-aspect.diff

File shake-aspect.diff, 1.3 KB (added by eriktorbjorn, 18 years ago)

Patch against a July 19 CVS snapshot

  • scummvm/backends/sdl/sdl.cpp

    diff -ur ScummVM-cvs20030719/scummvm/backends/sdl/sdl.cpp ScummVM-cvs20030719+hack/scummvm/backends/sdl/sdl.cpp
    old new  
    215215        // If the shake position changed, fill the dirty area with blackness
    216216        if (_currentShakePos != _newShakePos) {
    217217                SDL_Rect blackrect = {0, 0, _screenWidth * _scaleFactor, _newShakePos * _scaleFactor};
     218
     219                if (_adjustAspectRatio)
     220                        blackrect.h = real2Aspect(blackrect.h - 1) + 1;
     221
    218222                SDL_FillRect(_hwscreen, &blackrect, 0);
    219223
    220224                _currentShakePos = _newShakePos;
  • scummvm/backends/sdl/sdl_gl.cpp

    diff -ur ScummVM-cvs20030719/scummvm/backends/sdl/sdl_gl.cpp ScummVM-cvs20030719+hack/scummvm/backends/sdl/sdl_gl.cpp
    old new  
    365365                        fb2gl.blit16(tmpSurface, 1, &blackrect, 0, 0);
    366366                } else { // SDL backend
    367367                        SDL_Rect blackrect = {0, 0, _screenWidth * _scaleFactor, _newShakePos * _scaleFactor};
     368
     369                        if (_adjustAspectRatio)
     370                                blackrect.h = real2Aspect(blackrect.h - 1) + 1;
     371
    368372                        SDL_FillRect(_hwscreen, &blackrect, 0);
    369373                }
    370374