dep/libchdr: Sync to upstream (82670d5)
This commit is contained in:
@@ -46,8 +46,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "coretypes.h"
|
||||
|
||||
#include <libchdr/coretypes.h>
|
||||
#include <libchdr/chdconfig.h>
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@@ -347,6 +347,20 @@ struct _chd_verify_result
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef CHD_DLL
|
||||
#ifdef CHD_DLL_EXPORTS
|
||||
#define CHD_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define CHD_EXPORT __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
// Static library.
|
||||
#define CHD_EXPORT
|
||||
#endif
|
||||
#else
|
||||
#define CHD_EXPORT __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
|
||||
/* ----- CHD file management ----- */
|
||||
|
||||
@@ -357,27 +371,27 @@ struct _chd_verify_result
|
||||
/* chd_error chd_create_file(core_file *file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 compression, chd_file *parent); */
|
||||
|
||||
/* open an existing CHD file */
|
||||
chd_error chd_open(const char *filename, int mode, chd_file *parent, chd_file **chd);
|
||||
chd_error chd_open_file(core_file* file, int mode, chd_file* parent, chd_file** chd);
|
||||
CHD_EXPORT chd_error chd_open_file(core_file *file, int mode, chd_file *parent, chd_file **chd);
|
||||
CHD_EXPORT chd_error chd_open(const char *filename, int mode, chd_file *parent, chd_file **chd);
|
||||
|
||||
/* precache underlying file */
|
||||
chd_error chd_precache(chd_file *chd);
|
||||
CHD_EXPORT chd_error chd_precache(chd_file *chd);
|
||||
|
||||
/* close a CHD file */
|
||||
void chd_close(chd_file *chd);
|
||||
CHD_EXPORT void chd_close(chd_file *chd);
|
||||
|
||||
/* return the associated core_file */
|
||||
core_file *chd_core_file(chd_file *chd);
|
||||
CHD_EXPORT core_file *chd_core_file(chd_file *chd);
|
||||
|
||||
/* return an error string for the given CHD error */
|
||||
const char *chd_error_string(chd_error err);
|
||||
CHD_EXPORT const char *chd_error_string(chd_error err);
|
||||
|
||||
|
||||
|
||||
/* ----- CHD header management ----- */
|
||||
|
||||
/* return a pointer to the extracted CHD header data */
|
||||
const chd_header *chd_get_header(chd_file *chd);
|
||||
CHD_EXPORT const chd_header *chd_get_header(chd_file *chd);
|
||||
|
||||
|
||||
|
||||
@@ -385,14 +399,14 @@ const chd_header *chd_get_header(chd_file *chd);
|
||||
/* ----- core data read/write ----- */
|
||||
|
||||
/* read one hunk from the CHD file */
|
||||
chd_error chd_read(chd_file *chd, UINT32 hunknum, void *buffer);
|
||||
CHD_EXPORT chd_error chd_read(chd_file *chd, UINT32 hunknum, void *buffer);
|
||||
|
||||
|
||||
|
||||
/* ----- metadata management ----- */
|
||||
|
||||
/* get indexed metadata of a particular sort */
|
||||
chd_error chd_get_metadata(chd_file *chd, UINT32 searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 *resultlen, UINT32 *resulttag, UINT8 *resultflags);
|
||||
CHD_EXPORT chd_error chd_get_metadata(chd_file *chd, UINT32 searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 *resultlen, UINT32 *resulttag, UINT8 *resultflags);
|
||||
|
||||
|
||||
|
||||
@@ -400,10 +414,10 @@ chd_error chd_get_metadata(chd_file *chd, UINT32 searchtag, UINT32 searchindex,
|
||||
/* ----- codec interfaces ----- */
|
||||
|
||||
/* set internal codec parameters */
|
||||
chd_error chd_codec_config(chd_file *chd, int param, void *config);
|
||||
CHD_EXPORT chd_error chd_codec_config(chd_file *chd, int param, void *config);
|
||||
|
||||
/* return a string description of a codec */
|
||||
const char *chd_get_codec_name(UINT32 codec);
|
||||
CHD_EXPORT const char *chd_get_codec_name(UINT32 codec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user