diff options
-rw-r--r-- | backends/platform/3ds/osystem-graphics.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp index 1ea70053fb..fa419f28ec 100644 --- a/backends/platform/3ds/osystem-graphics.cpp +++ b/backends/platform/3ds/osystem-graphics.cpp @@ -370,8 +370,12 @@ void OSystem_3DS::setShakePos(int shakeXOffset, int shakeYOffset) { // TODO: implement this in overlay, top screen, and mouse too _screenShakeXOffset = shakeXOffset; _screenShakeYOffset = shakeYOffset; - _gameTopTexture.setPosition(_gameTopX, _gameTopY + _gameTopTexture.getScaleY() * shakeYOffset); - _gameBottomTexture.setPosition(_gameBottomX, _gameBottomY + _gameBottomTexture.getScaleY() * shakeYOffset); + int topX = _gameTopX + (_gameTopTexture.getScaleX() * shakeXOffset); + int topY = _gameTopY + (_gameTopTexture.getScaleY() * shakeYOffset); + _gameTopTexture.setPosition(topX, topY); + int bottomX = _gameBottomX + (_gameBottomTexture.getScaleX() * shakeXOffset); + int bottomY = _gameBottomY + (_gameBottomTexture.getScaleY() * shakeYOffset); + _gameBottomTexture.setPosition(bottomX, bottomY); } void OSystem_3DS::setFocusRectangle(const Common::Rect &rect) { |