mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-28 01:37:58 +03:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3314f00bf8 |
+1
-1
@@ -108,5 +108,5 @@ void ald_init(int type, const char **file, int cnt, boolean use_mmap) {
|
||||
int ald_get_maxno(DRIFILETYPE type) {
|
||||
if (type >= DRIFILETYPEMAX || !dri[type])
|
||||
return 0;
|
||||
return dri[type]->nr_files;
|
||||
return dri[type]->maxno;
|
||||
}
|
||||
|
||||
@@ -22,11 +22,14 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cdrom.h"
|
||||
#include "ald_manager.h"
|
||||
#include "music.h"
|
||||
#include "music_private.h"
|
||||
|
||||
static int current_track;
|
||||
|
||||
static int cdrom_bgm_init(char *dev) {
|
||||
prv.cd_maxtrk = ald_get_maxno(DRIFILE_BGM) + 1;
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ static bool read_index(int disk, drifiles *d, FILE *fp) {
|
||||
for (int i = 0; i < nr_files; i++) {
|
||||
if (disk != ltbl[i * 3] - 1)
|
||||
continue;
|
||||
if (d->maxno < i)
|
||||
d->maxno = i;
|
||||
d->disk[i] = ltbl[i * 3];
|
||||
int ptr = LittleEndian_getW(ltbl, i * 3 + 1);
|
||||
d->offset[i] = LittleEndian_get3B(ptbl, ptr * 3) << 8;
|
||||
|
||||
Reference in New Issue
Block a user