Start documenting scaler in libretro-SDK too

This commit is contained in:
twinaphex 2015-01-07 02:59:07 +01:00
parent 68f595fcf8
commit ae1b4f8884
2 changed files with 25 additions and 4 deletions

View File

@ -96,7 +96,7 @@ void dir_list_sort(struct string_list *list, bool dir_first)
* dir_list_free:
* @list : pointer to the directory listing
*
* Free a directory listing.
* Frees a directory listing.
*
**/
void dir_list_free(struct string_list *list)

View File

@ -29,15 +29,36 @@
#include <stdio.h>
#include <math.h>
// In case aligned allocs are needed later ...
/* In case aligned allocs are needed later. */
/**
* scaler_alloc:
* @elem_size : size of the elements to be used.
* @siz : size of the image that the scaler needs to handle.
*
* Allocate and returns a scaler object.
*
* Returns: pointer to a scaler object of type 'void *' on success,
* NULL in case of error. Has to be freed manually.
**/
void *scaler_alloc(size_t elem_size, size_t size)
{
return calloc(elem_size, size);
void *ptr = calloc(elem_size, size);
if (!ptr)
return NULL;
return ptr;
}
/**
* scaler_free:
* @ptr : pointer to scaler object.
*
* Frees a scaler object.
**/
void scaler_free(void *ptr)
{
free(ptr);
if (ptr)
free(ptr);
}
static bool allocate_frames(struct scaler_ctx *ctx)