diff options
Diffstat (limited to 'src/resources/ambientlayer.cpp')
-rw-r--r-- | src/resources/ambientlayer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp index 10d70c2c7..319bc5b8c 100644 --- a/src/resources/ambientlayer.cpp +++ b/src/resources/ambientlayer.cpp @@ -41,16 +41,16 @@ AmbientLayer::AmbientLayer(Image *img, float parallax, if (keepRatio && !mImage->useOpenGL() /*&& defaultScreenWidth != 0 && defaultScreenHeight != 0*/ - && graphics->mWidth != defaultScreenWidth - && graphics->mHeight != defaultScreenHeight) + && mainGraphics->mWidth != defaultScreenWidth + && mainGraphics->mHeight != defaultScreenHeight) { // Rescale the overlay to keep the ratio as if we were on // the default resolution... Image *rescaledOverlay = ResourceManager::getInstance()-> getRescaled(mImage, static_cast<int>(mImage->mBounds.w) - / defaultScreenWidth * graphics->mWidth, + / defaultScreenWidth * mainGraphics->mWidth, static_cast<int>(mImage->mBounds.h) - / defaultScreenHeight * graphics->mHeight); + / defaultScreenHeight * mainGraphics->mHeight); if (rescaledOverlay) mImage = rescaledOverlay; |