From 93a6596c7c8191cb6ad48fb7745c1f0da5af9923 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Wed, 15 May 2013 13:17:58 +0000 Subject: 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 --- 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() -- cgit v0.9.1