Lower CPU usage

Screen will not be always updated
This commit is contained in:
Ander
2015-05-19 17:04:47 +02:00
parent 2ee9d41393
commit e98e198224
17 changed files with 325 additions and 174 deletions

View File

@@ -37,8 +37,12 @@ class LibraryScreen(BaseScreen):
self.current_directory = directory
self.browse_uri(directory)
def update(self, screen):
self.list_view.render(screen)
def should_update(self):
return self.list_view.should_update()
def update(self, screen, update_type, rects):
update_all = (update_type == BaseScreen.update_all)
self.list_view.render(screen, update_all, rects)
def touch_event(self, touch_event):
clicked = self.list_view.touch_event(touch_event)