diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-05-15 13:17:58 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-05-15 13:17:58 (GMT) |
commit | 93a6596c7c8191cb6ad48fb7745c1f0da5af9923 (patch) | |
tree | 459ca7a6d1f308c909dca98c1aab8ec949f5b3bc | |
parent | eb4902251903ec758da185ebe1d9e30312c3cae2 (diff) |
Fix high cpu usage due to pygame mixer initialization - OLPC # 12677
pygame.init() initialize the mixer too [1], but in our case, we are not
playing any sound, and the mixer is playing silence.
[1] http://www.pygame.org/docs/ref/mixer.html#pygame.mixer.init
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | olpcgames/canvas.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/olpcgames/canvas.py b/olpcgames/canvas.py index 2583827..9f9983c 100644 --- a/olpcgames/canvas.py +++ b/olpcgames/canvas.py @@ -84,6 +84,8 @@ class PygameCanvas(gtk.Layout): os.environ['SDL_WINDOWID'] = str(self._socket.get_id()) #print 'Socket ID=%s'%os.environ['SDL_WINDOWID'] pygame.init() + # Maze does not use sound. stop the mixer due to OLPC #12677 + pygame.mixer.quit() self._translator.hook_pygame() |