[gnome-games] Initialise the canberra_gtk context only once



commit 3e39868c0376fa95fa5ac80ec180227134365a0b
Author: Christian Persch <chpe gnome org>
Date:   Fri May 8 21:58:37 2009 +0200

    Initialise the canberra_gtk context only once
    
    Fixes sound playing starting with 3rd time a sound is played, even if
    event sounds are disabled.
---
 libgames-support/games-sound.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libgames-support/games-sound.c b/libgames-support/games-sound.c
index d5502f7..2247037 100644
--- a/libgames-support/games-sound.c
+++ b/libgames-support/games-sound.c
@@ -92,8 +92,10 @@ games_sound_canberra_play (const char *sound_name,
       return;
 
     ca_context_change_props (context,
-                            CA_PROP_MEDIA_ROLE, "game",
-                            NULL);
+                             CA_PROP_MEDIA_ROLE, "game",
+                             NULL);
+
+    sound_init = TRUE;
   }
 
   if (!(context = ca_gtk_context_get ()))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]