mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Fixed an SVG graphics corruption issue.
This commit is contained in:
parent
c0f37cd088
commit
848e0a1a94
|
@ -75,9 +75,9 @@ bool TextureData::initSVGFromMemory(const std::string& fileData)
|
||||||
if (mSourceWidth == 0.0f && mSourceHeight == 0.0f) {
|
if (mSourceWidth == 0.0f && mSourceHeight == 0.0f) {
|
||||||
if (!mAlwaysRasterize)
|
if (!mAlwaysRasterize)
|
||||||
rasterize = false;
|
rasterize = false;
|
||||||
|
// Set a small temporary size that maintains the image aspect ratio.
|
||||||
mSourceWidth = svgImage->width;
|
mSourceWidth = 64.0f;
|
||||||
mSourceHeight = svgImage->height;
|
mSourceHeight = 64.0f * (svgImage->height / svgImage->width);
|
||||||
}
|
}
|
||||||
|
|
||||||
mWidth = static_cast<int>(std::round(mSourceWidth * mScaleDuringLoad));
|
mWidth = static_cast<int>(std::round(mSourceWidth * mScaleDuringLoad));
|
||||||
|
|
Loading…
Reference in a new issue