ConfigMenu: Reduce flickering when a plugin config is opened

This commit is contained in:
Maschell 2024-05-03 17:42:50 +02:00
parent 343092c338
commit 2047d5725b

View File

@ -35,6 +35,12 @@ CategoryRenderer::CategoryRenderer(const GeneralConfigInformation *info, const W
if (!mItemRenderer.empty()) { if (!mItemRenderer.empty()) {
mItemRenderer[mCursorPos]->SetIsSelected(true); mItemRenderer[mCursorPos]->SetIsSelected(true);
} }
// Make sure to call Update to get the current text of an item.
for (uint32_t i = 0; i < mItemRenderer.size(); i++) {
bool isHighlighted = ((int) i == mCursorPos);
mItemRenderer[i]->Update(isHighlighted);
}
} }
CategoryRenderer::~CategoryRenderer() { CategoryRenderer::~CategoryRenderer() {