mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue where image cropping didn't always work correctly.
This commit is contained in:
parent
016bc4f590
commit
0aae28c7a4
|
@ -202,6 +202,9 @@ void ImageComponent::coverFitCrop()
|
|||
{
|
||||
assert(mTargetIsCrop);
|
||||
|
||||
mTopLeftCrop = {0.0f, 0.0f};
|
||||
mBottomRightCrop = {1.0f, 1.0f};
|
||||
|
||||
if (std::round(mSize.y) > std::round(mTargetSize.y)) {
|
||||
const float cropSize {1.0f - (mTargetSize.y / mSize.y)};
|
||||
cropTop(cropSize / 2.0f);
|
||||
|
|
Loading…
Reference in a new issue