Fix songs_play_file use for sdlmixer=0

This commit is contained in:
Kp 2017-11-25 01:56:51 +00:00
parent 8376504a34
commit c60c0352f0
2 changed files with 9 additions and 1 deletions

View file

@ -36,6 +36,13 @@ struct bim_song_info
#define SONG_EXT_MP3 "mp3"
#endif
#if !DXX_USE_SDLMIXER
#ifdef _WIN32
#define songs_play_file(filename,repeat,hook_finished_track) songs_play_file(filename,repeat)
#else
#define songs_play_file(filename,repeat,hook_finished_track) songs_play_file()
#endif
#endif
int songs_play_file(const char *filename, int repeat, void (*hook_finished_track)());
#ifdef dsx
namespace dsx {

View file

@ -325,7 +325,7 @@ static void play_credits_track()
int songs_play_file(const char *filename, int repeat, void (*hook_finished_track)())
{
songs_stop_all();
#if defined(_WIN32) || DXX_USE_SDLMIXER
const char *fptr = strrchr(filename, '.');
if (fptr == NULL)
return 0;
@ -349,6 +349,7 @@ int songs_play_file(const char *filename, int repeat, void (*hook_finished_track
{
return mix_play_file( filename, repeat, hook_finished_track );
}
#endif
#endif
return 0;
}