reload snd fix

This commit is contained in:
p.kosyh 2011-04-17 12:43:00 +00:00
parent 120ae92a59
commit ef3f99a737
4 changed files with 8 additions and 3 deletions

View file

@ -5,7 +5,7 @@ CFLAGS += $(SDL_CFLAGS) $(LUA_CFLAGS) $(ZLIB_CFLAGS) $(EXTRA_CFLAGS) -DLANG_PATH
LDFLAGS += $(SDL_LFLAGS) $(LUA_LFLAGS) $(ZLIB_LFLAGS) $(EXTRA_LDFLAGS)
SRC := graphics.c input.c game.c main.c instead.c sound.c SDL_rotozoom.c SDL_anigif.c SDL_gfxBlitFunc.c config.c themes.c menu.c util.c cache.c unzip.c ioapi.c unpack.c lfs.c $(PLATFORM)
SRC := graphics.c input.c game.c main.c instead.c sound.c SDL_rotozoom.c SDL_anigif.c SDL_gfxBlitFunc.c config.c themes.c menu.c util.c cache.c unzip.c ioapi.c unpack.c lfs.c idf.c $(PLATFORM)
H := cache.h config.h externals.h game.h graphics.h input.h instead.h internals.h ioapi.h iowin32.h list.h \
menu.h SDL_anigif.h SDL_gfxBlitFunc.h SDL_rotozoom.h sound.h themes.h unzip.h util.h

View file

@ -1468,7 +1468,7 @@ static void sounds_reload(void)
list_for_each(pos, &sounds) {
sn = (_snd_t*)pos;
snd_free_wav(sn->wav);
sn->wav = snd_load_wav(sn->fname);
sn->wav = snd_load_wav(dirpath(sn->fname));
}
}

View file

@ -124,6 +124,11 @@ int main(int argc, char *argv[])
#endif
unix_path(game_cwd);
setdir(game_cwd);
idf_create("idf.idf", "./test");
idf_init("idf.idf");
exit(0);
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i],"-alsa"))
alsa_sw = 1;

View file

@ -304,7 +304,7 @@ char *sdl_path(char *p)
unix_path(p);
return p;
}
#if 1
#if 0
int setdir(const char *path)
{
return chdir(path);