diff --git a/libretro-common/formats/libchdr/libchdr_chd.c b/libretro-common/formats/libchdr/libchdr_chd.c index cf575cc7d4f1..9af680f1e85b 100644 --- a/libretro-common/formats/libchdr/libchdr_chd.c +++ b/libretro-common/formats/libchdr/libchdr_chd.c @@ -1568,14 +1568,14 @@ static chd_error hunk_read_into_cache(chd_file *chd, UINT32 hunknum) hunk -------------------------------------------------*/ -static UINT8* hunk_read_compressed(chd_file *chd, UINT64 offset, size_t size) +static UINT8* hunk_read_compressed(chd_file *chd, UINT64 offset, size_t len) { int64_t bytes; if (chd->file_cache) return chd->file_cache + offset; filestream_seek(chd->file, offset, SEEK_SET); - bytes = filestream_read(chd->file, chd->compressed, size); - if (bytes != (int64_t)size) + bytes = filestream_read(chd->file, chd->compressed, len); + if (bytes != (int64_t)len) return NULL; return chd->compressed; } @@ -1585,17 +1585,17 @@ static UINT8* hunk_read_compressed(chd_file *chd, UINT64 offset, size_t size) hunk -------------------------------------------------*/ -static chd_error hunk_read_uncompressed(chd_file *chd, UINT64 offset, size_t size, UINT8 *dest) +static chd_error hunk_read_uncompressed(chd_file *chd, UINT64 offset, size_t len, UINT8 *dest) { int64_t bytes; if (chd->file_cache) { - memcpy(dest, chd->file_cache + offset, size); + memcpy(dest, chd->file_cache + offset, len); return CHDERR_NONE; } filestream_seek(chd->file, offset, SEEK_SET); - bytes = filestream_read(chd->file, dest, size); - if (bytes != (int64_t)size) + bytes = filestream_read(chd->file, dest, len); + if (bytes != (int64_t)len) return CHDERR_READ_ERROR; return CHDERR_NONE; } diff --git a/libretro-common/include/formats/image.h b/libretro-common/include/formats/image.h index 70e5842204fc..863cb2d5cbd9 100644 --- a/libretro-common/include/formats/image.h +++ b/libretro-common/include/formats/image.h @@ -68,7 +68,7 @@ bool image_texture_color_convert(unsigned r_shift, struct texture_image *out_img); bool image_texture_load_buffer(struct texture_image *img, - enum image_type_enum type, void *buffer, size_t buffer_len); + enum image_type_enum type, void *s, size_t len); bool image_texture_load(struct texture_image *img, const char *path); void image_texture_free(struct texture_image *img); @@ -90,8 +90,10 @@ void image_transfer_set_buffer_ptr( int image_transfer_process( void *data, enum image_type_enum type, - uint32_t **buf, size_t size, - unsigned *width, unsigned *height); + uint32_t **buf, + size_t len, + unsigned *width, + unsigned *height); bool image_transfer_iterate(void *data, enum image_type_enum type); diff --git a/libretro-common/include/formats/rwav.h b/libretro-common/include/formats/rwav.h index e5379da0afd5..4a87f9f37171 100644 --- a/libretro-common/include/formats/rwav.h +++ b/libretro-common/include/formats/rwav.h @@ -62,7 +62,7 @@ typedef struct rwav_iterator rwav_iterator_t; /** * Initializes the iterator to fill the out structure with data parsed from buf. */ -void rwav_init(rwav_iterator_t* iter, rwav_t* out, const void* buf, size_t size); +void rwav_init(rwav_iterator_t *iter, rwav_t *out, const void* buf, size_t len); /** * Parses a piece of the data. Continue calling as long as it returns RWAV_ITERATE_MORE. @@ -75,7 +75,7 @@ enum rwav_state rwav_iterate(rwav_iterator_t *iter); /** * Loads the entire data in one go. */ -enum rwav_state rwav_load(rwav_t* out, const void* buf, size_t size); +enum rwav_state rwav_load(rwav_t *out, const void *buf, size_t len); /** * Frees parsed wave data. diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h index 1d7e765a55dc..099b681b922c 100644 --- a/libretro-common/include/libretro.h +++ b/libretro-common/include/libretro.h @@ -5365,14 +5365,14 @@ typedef bool (RETRO_CALLCONV *retro_set_initial_image_t)(unsigned index, const c * on the host's file system. * * @param index The index of the disk image to get the path of. - * @param path A buffer to store the path in. - * @param len The size of \c path, in bytes. + * @param s A buffer to store the path in. + * @param len The size of \c s, in bytes. * @return \c true if the disk image's location was successfully - * queried and copied into \c path, + * queried and copied into \c s, * \c false if the index is invalid * or the core couldn't locate the disk image. */ -typedef bool (RETRO_CALLCONV *retro_get_image_path_t)(unsigned index, char *path, size_t len); +typedef bool (RETRO_CALLCONV *retro_get_image_path_t)(unsigned index, char *s, size_t len); /** * Returns a friendly label for the given disk image. @@ -5388,12 +5388,12 @@ typedef bool (RETRO_CALLCONV *retro_get_image_path_t)(unsigned index, char *path * so that the frontend can provide better guidance to the player. * * @param index The index of the disk image to return a label for. - * @param label A buffer to store the resulting label in. - * @param len The length of \c label, in bytes. + * @param s A buffer to store the resulting label in. + * @param len The length of \c s, in bytes. * @return \c true if the disk image at \c index is valid - * and a label was copied into \c label. + * and a label was copied into \c s. */ -typedef bool (RETRO_CALLCONV *retro_get_image_label_t)(unsigned index, char *label, size_t len); +typedef bool (RETRO_CALLCONV *retro_get_image_label_t)(unsigned index, char *s, size_t len); /** * An interface that the frontend can use to exchange disks @@ -7705,7 +7705,7 @@ RETRO_API size_t retro_serialize_size(void); * @see retro_serialize_size() * @see retro_unserialize() */ -RETRO_API bool retro_serialize(void *data, size_t size); +RETRO_API bool retro_serialize(void *data, size_t len); /** * Unserialize the given state data, and load it into the internal state. @@ -7714,7 +7714,7 @@ RETRO_API bool retro_serialize(void *data, size_t size); * * @see retro_serialize() */ -RETRO_API bool retro_unserialize(const void *data, size_t size); +RETRO_API bool retro_unserialize(const void *data, size_t len); /** * Reset all the active cheats to their default disabled state.