mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Fixed an issue where system view elements could render outside the designated area.
This commit is contained in:
parent
8d5dc46fc6
commit
ab5af86f7e
|
@ -163,10 +163,18 @@ void SystemView::render(const glm::mat4& parentTrans)
|
||||||
renderElements(parentTrans, false);
|
renderElements(parentTrans, false);
|
||||||
glm::mat4 trans {getTransform() * parentTrans};
|
glm::mat4 trans {getTransform() * parentTrans};
|
||||||
|
|
||||||
|
// Make sure nothing renders outside our designated area.
|
||||||
|
mRenderer->pushClipRect(
|
||||||
|
glm::ivec2 {static_cast<int>(std::round(trans[3].x)),
|
||||||
|
static_cast<int>(std::round(trans[3].y))},
|
||||||
|
glm::ivec2 {static_cast<int>(std::round(mSize.x)), static_cast<int>(std::round(mSize.y))});
|
||||||
|
|
||||||
mPrimary->render(trans);
|
mPrimary->render(trans);
|
||||||
|
|
||||||
if (!fade || mLegacyMode)
|
if (!fade || mLegacyMode)
|
||||||
renderElements(parentTrans, true);
|
renderElements(parentTrans, true);
|
||||||
|
|
||||||
|
mRenderer->popClipRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemView::onThemeChanged(const std::shared_ptr<ThemeData>& /*theme*/)
|
void SystemView::onThemeChanged(const std::shared_ptr<ThemeData>& /*theme*/)
|
||||||
|
|
Loading…
Reference in a new issue