Commit 39d813fe authored by Bruno Coudoin's avatar Bruno Coudoin

sounds: when ran with ./runnit.sh the sounds was not working. Now the ogg backend get the realpath.

parent 67556364
......@@ -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;
}
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment