mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed an issue where the battery percentage text was sometimes shown when it shouldn't have been
This commit is contained in:
parent
dd8177a8c2
commit
331a33be74
|
|
@ -120,7 +120,9 @@ void SystemStatusComponent::updateGrid()
|
|||
}
|
||||
}
|
||||
|
||||
if (mHasBattery && mBatteryText) {
|
||||
if (mHasBattery && mBatteryText &&
|
||||
std::find(mDisplayEntries.cbegin(), mDisplayEntries.cend(), "battery") !=
|
||||
mDisplayEntries.cend()) {
|
||||
// We set the initial value to "100%" to calculate the cell size based on this, as this
|
||||
// will be the longest text that will ever be displayed for the battery capacity.
|
||||
mBatteryPercentage = std::make_shared<TextComponent>(
|
||||
|
|
|
|||
Loading…
Reference in a new issue