Decompile HuDVDReadAsyncCallBack
This commit is contained in:
parent
c831b27965
commit
5001e49b8d
2 changed files with 28 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define _COMMON_STRUCTS_H
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/dvd.h"
|
||||
|
||||
typedef struct UnkOvl {
|
||||
s32 unk0;
|
||||
|
|
@ -62,4 +63,16 @@ typedef struct file_list_entry {
|
|||
s32 file_id;
|
||||
} FileListEntry;
|
||||
|
||||
typedef struct data_stat {
|
||||
s32 dir_id;
|
||||
void *dir;
|
||||
void *data;
|
||||
u32 raw_len;
|
||||
u32 comp_type;
|
||||
BOOL used;
|
||||
s32 num;
|
||||
u32 status;
|
||||
DVDFileInfo file_info;
|
||||
} DataStat;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "dolphin/os.h"
|
||||
|
||||
extern u32 DirDataSize;
|
||||
extern void HuDataDirReadAsyncCallBack(s32 result, DVDFileInfo* fileInfo);
|
||||
|
||||
static DVDDiskID correctDiskID = {
|
||||
{ 'M', 'P', 'G', 'C' }, //gameName
|
||||
|
|
@ -18,7 +19,7 @@ void HuDvdErrorWatch();
|
|||
static s32 beforeDvdStatus;
|
||||
static int CallBackStatus;
|
||||
|
||||
static void HuDVDReadAsyncCallBack()
|
||||
static void HuDVDReadAsyncCallBack(s32 result, DVDFileInfo* fileInfo)
|
||||
{
|
||||
CallBackStatus = 1;
|
||||
}
|
||||
|
|
@ -125,9 +126,8 @@ void *HuDvdDataFastReadNum(s32 entrynum, s32 num)
|
|||
DVDFileInfo file;
|
||||
void *data = NULL;
|
||||
if(!DVDFastOpen(entrynum, &file)) {
|
||||
OSPanic("dvd.c", 258, "dvd.c: File Open Error");
|
||||
(void)num;
|
||||
(void)data;
|
||||
OSPanic("dvd.c", 258, "dvd.c: File Open Error");
|
||||
} else {
|
||||
data = HuDvdDataReadWait(&file, 3, 1, num, HuDVDReadAsyncCallBack, FALSE);
|
||||
DVDClose(&file);
|
||||
|
|
@ -135,6 +135,18 @@ void *HuDvdDataFastReadNum(s32 entrynum, s32 num)
|
|||
return data;
|
||||
}
|
||||
|
||||
void *HuDvdDataFastReadAsync(s32 entrynum, DataStat *stat)
|
||||
{
|
||||
DVDFileInfo file;
|
||||
void *data = NULL;
|
||||
if(!DVDFastOpen(entrynum, &stat->file_info)) {
|
||||
OSPanic("dvd.c", 274, "dvd.c: File Open Error");
|
||||
} else {
|
||||
data = HuDvdDataReadWait(&stat->file_info, 3, 0, 0, HuDataDirReadAsyncCallBack, TRUE);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
void HuDvdDataClose(void *ptr)
|
||||
{
|
||||
if(ptr) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue