mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Start documenting scaler in libretro-SDK too
This commit is contained in:
parent
68f595fcf8
commit
ae1b4f8884
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user