Reduce unnecessary status bar redraws
This commit is contained in:
@@ -81,6 +81,7 @@ struct StatusBarWindow : Window {
|
||||
int ticker_scroll;
|
||||
GUITimer ticker_timer;
|
||||
GUITimer reminder_timeout;
|
||||
int64 last_minute = 0;
|
||||
|
||||
static const int TICKER_STOP = 1640; ///< scrolling is finished when counter reaches this value
|
||||
static const int REMINDER_START = 1350; ///< time in ms for reminder notification (red dot on the right) to stay
|
||||
@@ -223,7 +224,8 @@ struct StatusBarWindow : Window {
|
||||
{
|
||||
if (_pause_mode != PM_UNPAUSED) return;
|
||||
|
||||
if (_settings_client.gui.time_in_minutes) {
|
||||
if (_settings_client.gui.time_in_minutes && this->last_minute != CURRENT_MINUTE) {
|
||||
this->last_minute = CURRENT_MINUTE;
|
||||
this->SetWidgetDirty(WID_S_LEFT);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user