Browse Source

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

Wei Mingzhi 7 years ago
parent
commit
f9b6a86ed8
1 changed files with 4 additions and 4 deletions
  1. 4 4
      audio.c

+ 4 - 4
audio.c

@@ -259,10 +259,10 @@ AUDIO_OpenDevice(
    switch (gConfig.eMusicType)
    {
    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;
    case MUSIC_MP3:
 	   gAudioDevice.pMusPlayer = MP3_Init();