mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 22:25:39 +00:00
Lower CPU usage
Screen will not be always updated
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
class BaseScreen():
|
||||
|
||||
update_all = 0
|
||||
update_partial = 1
|
||||
no_update = 2
|
||||
|
||||
def __init__(self, size, base_size, manager, fonts):
|
||||
self.size = size
|
||||
self.base_size = base_size
|
||||
self.manager = manager
|
||||
self.fonts = fonts
|
||||
|
||||
def update(self, surface):
|
||||
def update(self, surface, update_type, rects):
|
||||
pass
|
||||
|
||||
def event(self, event):
|
||||
@@ -14,3 +18,6 @@ class BaseScreen():
|
||||
|
||||
def change_screen(self, direction):
|
||||
return False
|
||||
|
||||
def should_update(self):
|
||||
return BaseScreen.update_partial
|
||||
|
||||
Reference in New Issue
Block a user