diff options
author | athrxx | 2020-01-08 17:28:59 +0100 |
---|---|---|
committer | athrxx | 2020-01-08 20:27:53 +0100 |
commit | 2f919d39e4b9ae0cb1f66b97b29a00525619b4c1 (patch) | |
tree | 260766d44c0eee7520549dd4593a7be5914c2681 | |
parent | 1dc24d06fd1fbd5cadb07cbee988240829f27c7f (diff) | |
download | scummvm-rg350-2f919d39e4b9ae0cb1f66b97b29a00525619b4c1.tar.gz scummvm-rg350-2f919d39e4b9ae0cb1f66b97b29a00525619b4c1.tar.bz2 scummvm-rg350-2f919d39e4b9ae0cb1f66b97b29a00525619b4c1.zip |
GRAPHICS: (really) fix screen shake x/y offsets
I confused window w/h with actual drawing w/h. And obviously forgot to test stretch modes like "Center". Now these modes also seem to work pixel exact...
-rw-r--r-- | backends/graphics/windowed.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/graphics/windowed.h b/backends/graphics/windowed.h index bea4522d5a..99115275de 100644 --- a/backends/graphics/windowed.h +++ b/backends/graphics/windowed.h @@ -406,8 +406,8 @@ private: } } - drawRect.left = ((_windowWidth - width) / 2) + _gameScreenShakeXOffset * _windowWidth / getWidth(); - drawRect.top = ((_windowHeight - height) / 2) + _gameScreenShakeYOffset * _windowHeight / getHeight(); + drawRect.left = ((_windowWidth - width) / 2) + _gameScreenShakeXOffset * width / getWidth(); + drawRect.top = ((_windowHeight - height) / 2) + _gameScreenShakeYOffset * height / getHeight(); drawRect.setWidth(width); drawRect.setHeight(height); } |