浏览代码

fix: unable to load music if the pathname does not contains a trailing slash

Wei Mingzhi 7 年之前
父节点
当前提交
f9b6a86ed8
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      audio.c

+ 4 - 4
audio.c

@@ -259,10 +259,10 @@ AUDIO_OpenDevice(
    switch (gConfig.eMusicType)
    switch (gConfig.eMusicType)
    {
    {
    case MUSIC_RIX:
    case MUSIC_RIX:
-	   if (!(gAudioDevice.pMusPlayer = RIX_Init(va("%s%s", gConfig.pszGamePath, "mus.mkf"))))
-	   {
-		   gAudioDevice.pMusPlayer = RIX_Init(va("%s%s", gConfig.pszGamePath, "MUS.MKF"));
-	   }
+       if (!(gAudioDevice.pMusPlayer = RIX_Init(va("%s/%s", gConfig.pszGamePath, "mus.mkf"))))
+       {
+           gAudioDevice.pMusPlayer = RIX_Init(va("%s/%s", gConfig.pszGamePath, "MUS.MKF"));
+       }
 	   break;
 	   break;
    case MUSIC_MP3:
    case MUSIC_MP3:
 	   gAudioDevice.pMusPlayer = MP3_Init();
 	   gAudioDevice.pMusPlayer = MP3_Init();