diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index b86e7bb1f..12b28e553 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -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(std::round(trans[3].x)), + static_cast(std::round(trans[3].y))}, + glm::ivec2 {static_cast(std::round(mSize.x)), static_cast(std::round(mSize.y))}); + mPrimary->render(trans); if (!fade || mLegacyMode) renderElements(parentTrans, true); + + mRenderer->popClipRect(); } void SystemView::onThemeChanged(const std::shared_ptr& /*theme*/)