mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue where corrupt textures could get rendered.
This commit is contained in:
parent
17d8f8eb5b
commit
36fe3c871c
|
@ -384,8 +384,8 @@ void ImageComponent::updateColors()
|
|||
|
||||
void ImageComponent::render(const glm::mat4& parentTrans)
|
||||
{
|
||||
if (!isVisible() || mTexture == nullptr ||
|
||||
(mTargetSize == glm::vec2 {0.0f, 0.0f} && mSize == glm::vec2 {0.0f, 0.0f}))
|
||||
if (!isVisible() || mTexture == nullptr || mTargetSize == glm::vec2 {0.0f, 0.0f} ||
|
||||
mSize == glm::vec2 {0.0f, 0.0f})
|
||||
return;
|
||||
|
||||
glm::mat4 trans {parentTrans * getTransform()};
|
||||
|
|
|
@ -485,6 +485,7 @@ void TextListComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
bool tile = elem->has("selectorImageTile") && elem->get<bool>("selectorImageTile");
|
||||
mSelectorImage.setImage(path, tile);
|
||||
mSelectorImage.setSize(mSize.x, mSelectorHeight);
|
||||
mSelectorImage.setResize(mSize.x, mSelectorHeight);
|
||||
mSelectorImage.setColorShift(mSelectorColor);
|
||||
mSelectorImage.setColorShiftEnd(mSelectorColorEnd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue