aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl
diff options
context:
space:
mode:
authorMax Horn2003-07-21 00:01:05 +0000
committerMax Horn2003-07-21 00:01:05 +0000
commit88810dc9bd66e561e48752149302f0b8bc49d566 (patch)
tree17857c3e1dc4864cfdbbe4444ef1d4e9d8a7b31e /backends/sdl
parent6a8078b2fbccbf019e4789346122c4d6b5e6bdb3 (diff)
downloadscummvm-rg350-88810dc9bd66e561e48752149302f0b8bc49d566.tar.gz
scummvm-rg350-88810dc9bd66e561e48752149302f0b8bc49d566.tar.bz2
scummvm-rg350-88810dc9bd66e561e48752149302f0b8bc49d566.zip
part of patch #774556: fix for aspect mode + shaking
svn-id: r9102
Diffstat (limited to 'backends/sdl')
-rw-r--r--backends/sdl/sdl.cpp4
-rw-r--r--backends/sdl/sdl_gl.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp
index b95d7a2775..24c9cc3f72 100644
--- a/backends/sdl/sdl.cpp
+++ b/backends/sdl/sdl.cpp
@@ -215,6 +215,10 @@ void OSystem_SDL::update_screen() {
// If the shake position changed, fill the dirty area with blackness
if (_currentShakePos != _newShakePos) {
SDL_Rect blackrect = {0, 0, _screenWidth * _scaleFactor, _newShakePos * _scaleFactor};
+
+ if (_adjustAspectRatio)
+ blackrect.h = real2Aspect(blackrect.h - 1) + 1;
+
SDL_FillRect(_hwscreen, &blackrect, 0);
_currentShakePos = _newShakePos;
diff --git a/backends/sdl/sdl_gl.cpp b/backends/sdl/sdl_gl.cpp
index cc307eae58..8215672427 100644
--- a/backends/sdl/sdl_gl.cpp
+++ b/backends/sdl/sdl_gl.cpp
@@ -365,6 +365,10 @@ void OSystem_SDL_OpenGL::update_screen() {
fb2gl.blit16(tmpSurface, 1, &blackrect, 0, 0);
} else { // SDL backend
SDL_Rect blackrect = {0, 0, _screenWidth * _scaleFactor, _newShakePos * _scaleFactor};
+
+ if (_adjustAspectRatio)
+ blackrect.h = real2Aspect(blackrect.h - 1) + 1;
+
SDL_FillRect(_hwscreen, &blackrect, 0);
}