Move UI dirty tracking out of application main.cpp.

This commit is contained in:
Jared Boone 2015-08-14 21:17:23 -07:00
parent fa465c14c4
commit a9bb7c96e5
3 changed files with 20 additions and 10 deletions

View file

@ -96,12 +96,6 @@ static spi_bus_t ssp0 = {
};
#endif
static bool ui_dirty = true;
void ui::dirty_event() {
ui_dirty = true;
}
class EventDispatcher {
public:
EventDispatcher(
@ -316,9 +310,9 @@ private:
}
void handle_lcd_frame_sync() {
if( ui_dirty ) {
if( ui::is_dirty() ) {
paint_widget(top_widget);
ui_dirty = false;
ui::dirty_clear();
}
}