Merge pull request #516 from NicknineTheEagle/bugfix

EA MPF: Fixed SSX 3
This commit is contained in:
NicknineTheEagle 2019-11-23 15:37:39 +03:00 committed by GitHub
commit 2ac2c0ce28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -561,8 +561,8 @@ static STREAMFILE *open_mapfile_pair(STREAMFILE *streamFile, int track, int num_
int i, j;
size_t file_len, map_len;
/* if there's only one track, try opening MUS with the same name first (most common scenario) */
if (num_tracks == 1) {
/* if loading the first track, try opening MUS with the same name first (most common scenario) */
if (track == 0) {
musFile = open_streamfile_by_ext(streamFile, "mus");
if (musFile) return musFile;
}

View File

@ -645,7 +645,11 @@ static STREAMFILE* open_mapfile_pair(STREAMFILE *streamFile, int track, int num_
* ZTRxxROK.MAP > ZZZTRxxA.TRJ
* ZTRxxTEC.MAP > ZZZTRxxB.TRM
* ZTR00R0A.MAP and ZTR00R0B.MAP > ZZZTR00A.TRJ
* other extra files that may need the hack below */
* other extra files that may need the hack below
* SSX 3:
* *.mpf > *.mus,xxloops0.mus
* really need to think of something for this
*/
};
STREAMFILE *musFile = NULL;
char file_name[PATH_LIMIT];
@ -653,8 +657,8 @@ static STREAMFILE* open_mapfile_pair(STREAMFILE *streamFile, int track, int num_
int i, j;
size_t file_len, map_len;
/* if there's only one track, try opening MUS with the same name first (most common scenario) */
if (num_tracks == 1) {
/* if loading the first track, try opening MUS with the same name first (most common scenario) */
if (track == 0) {
musFile = open_streamfile_by_ext(streamFile, "mus");
if (musFile) return musFile;
}