[gcompris] Fixed invisible cursor on 64 bits systems.



commit af5058722f44ab548c9ad754fe9d9594369c5ff2
Author: Peter Ujfalusi <peter ujfalusi gmail com>
Date:   Thu Jan 27 23:36:55 2011 +0100

    Fixed invisible cursor on 64 bits systems.
    
    The propoerty struct is now properly initialized even on 64 bits systems.

 src/gcompris/gcompris.c   |    3 ---
 src/gcompris/properties.c |    5 ++++-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index a4e618b..d5053f9 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -1541,9 +1541,6 @@ main (int argc, char *argv[])
   g_option_context_parse (context, &argc, &argv, &error);
   g_option_context_free(context);
 
-  // Set the default gcompris cursor
-  properties->defaultcursor = GCOMPRIS_DEFAULT_CURSOR;
-
   /* Set the default message handler, it avoids message with option -D */
   g_log_set_handler (NULL, G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_DEBUG | G_LOG_FLAG_FATAL
 		     | G_LOG_FLAG_RECURSION, gc_log_handler, NULL);
diff --git a/src/gcompris/properties.c b/src/gcompris/properties.c
index 29e43dd..cd36624 100644
--- a/src/gcompris/properties.c
+++ b/src/gcompris/properties.c
@@ -143,10 +143,13 @@ gc_prop_new ()
 {
   GcomprisProperties *tmp;
 
-  tmp = (GcomprisProperties *) malloc (sizeof (GcomprisProperties));
+  tmp = (GcomprisProperties *) calloc (1, sizeof (GcomprisProperties));
   tmp->music		 = 1;
   tmp->fx		 = 1;
   tmp->fullscreen	 = 1;
+  // Set the default gcompris cursor
+  tmp->defaultcursor	 = GCOMPRIS_DEFAULT_CURSOR;
+  tmp->nocursor		 = 0;
   tmp->timer		 = 1;
   tmp->skin		 = g_strdup("babytoy");
   tmp->key		 = g_strdup("default");



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