diff options
| author | athrxx | 2020-01-06 23:17:19 +0100 | 
|---|---|---|
| committer | athrxx | 2020-01-07 22:47:32 +0100 | 
| commit | c4780d2befd15dbd66ac54de4a18f29fbc7acd93 (patch) | |
| tree | 95a481631a37c4c689c84e4703113d7ddd9785a6 /backends/graphics | |
| parent | 70d7de0b98cb0bf181f18125defab1ffb2d1efb5 (diff) | |
| download | scummvm-rg350-c4780d2befd15dbd66ac54de4a18f29fbc7acd93.tar.gz scummvm-rg350-c4780d2befd15dbd66ac54de4a18f29fbc7acd93.tar.bz2 scummvm-rg350-c4780d2befd15dbd66ac54de4a18f29fbc7acd93.zip | |
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.
Diffstat (limited to 'backends/graphics')
| -rw-r--r-- | backends/graphics/windowed.h | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/backends/graphics/windowed.h b/backends/graphics/windowed.h index 40fbe8baf7..bea4522d5a 100644 --- a/backends/graphics/windowed.h +++ b/backends/graphics/windowed.h @@ -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);  	} | 
