GRAPHICS: Fix screen shake x/y offsets scaling

The x and y offsets need to be scaled the same way as the rest of the screen output.
This commit is contained in:
athrxx 2020-01-06 23:17:19 +01:00
parent 70d7de0b98
commit c4780d2bef

View File

@ -405,9 +405,9 @@ private:
width = fracToInt(height * displayAspect);
}
}
drawRect.left = ((_windowWidth - width) / 2) + _gameScreenShakeXOffset;
drawRect.top = ((_windowHeight - height) / 2) + _gameScreenShakeYOffset;
drawRect.left = ((_windowWidth - width) / 2) + _gameScreenShakeXOffset * _windowWidth / getWidth();
drawRect.top = ((_windowHeight - height) / 2) + _gameScreenShakeYOffset * _windowHeight / getHeight();
drawRect.setWidth(width);
drawRect.setHeight(height);
}