mirror of
https://github.com/dborth/vbagx.git
synced 2025-01-26 09:15:27 +01:00
fix loading for DVD zip files
This commit is contained in:
parent
11e5e270a2
commit
2c87356ef8
@ -217,8 +217,6 @@ int dvd_safe_read(void *dst_v, u32 len, u64 offset)
|
|||||||
ret |= dvd_buffered_read(buffer, DVD_MAX_READ_LENGTH, currentOffset); // read 32 byte from the dvd
|
ret |= dvd_buffered_read(buffer, DVD_MAX_READ_LENGTH, currentOffset); // read 32 byte from the dvd
|
||||||
memcpy(&dst[bufferOffset], buffer, bytesToRead); // copy bytes to output buffer
|
memcpy(&dst[bufferOffset], buffer, bytesToRead); // copy bytes to output buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
//free(tmp);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -506,6 +504,7 @@ int DirectorySearch(char dir[512])
|
|||||||
* SwitchDVDFolder
|
* SwitchDVDFolder
|
||||||
*
|
*
|
||||||
* Recursively searches for any directory path 'dir' specified
|
* Recursively searches for any directory path 'dir' specified
|
||||||
|
* Also can be used to find and set the offset for a file
|
||||||
* Also loads the directory contents via ParseDVDdirectory()
|
* Also loads the directory contents via ParseDVDdirectory()
|
||||||
* It relies on dvddir, dvddirlength, and filelist being pre-populated
|
* It relies on dvddir, dvddirlength, and filelist being pre-populated
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
@ -531,7 +530,10 @@ bool SwitchDVDFolder(char * dir, int maxDepth)
|
|||||||
{
|
{
|
||||||
dvddir = filelist[dirindex].offset;
|
dvddir = filelist[dirindex].offset;
|
||||||
dvddirlength = filelist[dirindex].length;
|
dvddirlength = filelist[dirindex].length;
|
||||||
maxfiles = ParseDVDdirectory();
|
selection = dirindex;
|
||||||
|
|
||||||
|
if(filelist[dirindex].flags) // only parse directories
|
||||||
|
maxfiles = ParseDVDdirectory();
|
||||||
|
|
||||||
if(lastdir)
|
if(lastdir)
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user