mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-20 07:15:38 +00:00
dep/libchdr: Add chd_get_compressed_size()
This commit is contained in:
parent
bbd021bd5f
commit
fd341f6a9d
|
@ -389,11 +389,13 @@ CHD_EXPORT void chd_close(chd_file *chd);
|
||||||
/* return the associated core_file */
|
/* return the associated core_file */
|
||||||
CHD_EXPORT core_file *chd_core_file(chd_file *chd);
|
CHD_EXPORT core_file *chd_core_file(chd_file *chd);
|
||||||
|
|
||||||
|
/* return the overall size of a CHD, and any of its parents */
|
||||||
|
CHD_EXPORT UINT64 chd_get_compressed_size(chd_file* chd);
|
||||||
|
|
||||||
/* return an error string for the given CHD error */
|
/* return an error string for the given CHD error */
|
||||||
CHD_EXPORT const char *chd_error_string(chd_error err);
|
CHD_EXPORT const char *chd_error_string(chd_error err);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ----- CHD header management ----- */
|
/* ----- CHD header management ----- */
|
||||||
|
|
||||||
/* return a pointer to the extracted CHD header data */
|
/* return a pointer to the extracted CHD header data */
|
||||||
|
|
|
@ -1952,6 +1952,14 @@ CHD_EXPORT core_file *chd_core_file(chd_file *chd)
|
||||||
return chd->file;
|
return chd->file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CHD_EXPORT UINT64 chd_get_compressed_size(chd_file *chd)
|
||||||
|
{
|
||||||
|
UINT64 size = chd->file->fsize(chd->file);
|
||||||
|
if (chd->parent)
|
||||||
|
size += chd_get_compressed_size(chd->parent);
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------
|
/*-------------------------------------------------
|
||||||
chd_error_string - return an error string for
|
chd_error_string - return an error string for
|
||||||
the given CHD error
|
the given CHD error
|
||||||
|
|
Loading…
Reference in a new issue