MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / DVDOpen

Function DVDOpen

src/dolphin/src/dvd/dvdfs.c:209–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209BOOL DVDOpen(const char* fileName, DVDFileInfo* fileInfo)
210{
211 s32 entry;
212 char currentDir[128];
213
214 entry = DVDConvertPathToEntrynum(fileName);
215
216 if (0 > entry)
217 {
218 DVDGetCurrentDir(currentDir, 128);
219 OSReport("Warning: DVDOpen(): file '%s' was not found under %s.\n", fileName, currentDir);
220 return FALSE;
221 }
222
223 if (entryIsDir(entry))
224 {
225 return FALSE;
226 }
227
228 fileInfo->startAddr = filePosition(entry);
229 fileInfo->length = fileLength(entry);
230 fileInfo->callback = (DVDCallback)NULL;
231 fileInfo->cb.state = DVD_STATE_END;
232
233 return TRUE;
234}
235
236BOOL DVDClose(DVDFileInfo* fileInfo)
237{

Callers

nothing calls this directly

Calls 3

DVDConvertPathToEntrynumFunction · 0.85
DVDGetCurrentDirFunction · 0.85
OSReportFunction · 0.85

Tested by

no test coverage detected