[gcompris] sounds: when ran with ./runnit.sh the sounds was not working. Now the ogg backend get the realpath.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] sounds: when ran with ./runnit.sh the sounds was not working. Now the ogg backend get the realpath.
- Date: Sun, 15 May 2011 21:13:56 +0000 (UTC)
commit 39d813fe9fbb2a21bc21549e065af15b1c48db9f
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sun May 15 01:55:41 2011 +0200
sounds: when ran with ./runnit.sh the sounds was not working. Now the ogg backend get the realpath.
src/gcompris/gameutil.c | 7 +------
src/gcompris/gstreamer.c | 10 ++++++++--
2 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c
index 81111af..cd376d4 100644
--- a/src/gcompris/gameutil.c
+++ b/src/gcompris/gameutil.c
@@ -31,10 +31,6 @@
#include "gcompris.h"
-#ifdef WIN32
-#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
-#endif
-
extern GooCanvas *canvas;
typedef void (*sighandler_t)(int);
@@ -649,6 +645,7 @@ gc_file_find_absolute(const gchar *format, ...)
}
NOT_FOUND:
+ g_debug("absolute_filename '%s' NOT FOUND\n", filename);
g_free(filename);
g_free(absolute_filename);
return NULL;
@@ -656,8 +653,6 @@ gc_file_find_absolute(const gchar *format, ...)
FOUND:
g_free(filename);
// printf("absolute_filename=%s\n", absolute_filename);
- // char *abs_name = realpath(absolute_filename, NULL);
- //g_free(absolute_filename);
return absolute_filename;
}
diff --git a/src/gcompris/gstreamer.c b/src/gcompris/gstreamer.c
index 6d9eb22..c0b1fbd 100644
--- a/src/gcompris/gstreamer.c
+++ b/src/gcompris/gstreamer.c
@@ -233,9 +233,15 @@ fx_play()
if(!file)
return;
- g_debug(" fx_play %s", file);
+ absolute_file = gc_file_find_absolute(file, NULL);
+ if (absolute_file)
+ {
+ char *_realpath = realpath(absolute_file, NULL);
+ g_free(absolute_file);
+ absolute_file = _realpath;
+ }
- absolute_file = gc_file_find_absolute(file);
+ g_debug(" fx_play %s (%s)", file, absolute_file);
if (!absolute_file ||
!properties->fx)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]