mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05: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);
|
||||
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);
|
||||
|
||||
if (!fade || mLegacyMode)
|
||||
renderElements(parentTrans, true);
|
||||
|
||||
mRenderer->popClipRect();
|
||||
}
|
||||
|
||||
void SystemView::onThemeChanged(const std::shared_ptr<ThemeData>& /*theme*/)
|
||||
|
|
Loading…
Reference in a new issue