[Fix] Ensure that music doesn't stall.

This commit is contained in:
Allanis 2014-06-05 18:04:57 +01:00
parent 5d67c45570
commit e45909e9aa
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,7 @@
#ifdef DEBUGGING #ifdef DEBUGGING
#ifdef DEBUG_PARANOID #ifdef DEBUG_PARANOID
#define LLUA_DEBUG(str, args...) \ #define LLUA_DEBUG(str, args...) \
(fprintf(stdout, "Lua: "str"\n, ## args), abort()) (fprintf(stdout, "Lua: "str"\n", ## args), abort())
#else #else
#define LLUA_DEBUG(str, args...) \ #define LLUA_DEBUG(str, args...) \
(fprintf(stdout, "Lua: "str"\n", ## args)) (fprintf(stdout, "Lua: "str"\n", ## args))

View File

@ -93,6 +93,10 @@ void music_update(void) {
SDL_mutexV(music_lock); SDL_mutexV(music_lock);
music_runLua(buf); music_runLua(buf);
/* Make sure music is playing. */
if(!music_isPlaying())
music_choose("idle");
} }
/** /**