mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 03:40:03 +00:00
ffemu.c - Document
This commit is contained in:
parent
a17788a1f8
commit
2dadadab56
@ -30,9 +30,19 @@ static const ffemu_backend_t *ffemu_backends[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ffemu_find_backend:
|
||||||
|
* @ident : Identifier of driver to find.
|
||||||
|
*
|
||||||
|
* Finds a recording driver with the name @ident.
|
||||||
|
*
|
||||||
|
* Returns: recording driver handle if successful, otherwise
|
||||||
|
* NULL.
|
||||||
|
**/
|
||||||
const ffemu_backend_t *ffemu_find_backend(const char *ident)
|
const ffemu_backend_t *ffemu_find_backend(const char *ident)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; ffemu_backends[i]; i++)
|
for (i = 0; ffemu_backends[i]; i++)
|
||||||
{
|
{
|
||||||
if (!strcmp(ffemu_backends[i]->ident, ident))
|
if (!strcmp(ffemu_backends[i]->ident, ident))
|
||||||
@ -42,19 +52,31 @@ const ffemu_backend_t *ffemu_find_backend(const char *ident)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gfx_ctx_init_first:
|
||||||
|
* @backend : Recording backend handle.
|
||||||
|
* @data : Recording data handle.
|
||||||
|
* @params : Recording info parameters.
|
||||||
|
*
|
||||||
|
* Finds first suitable recording context driver and initializes.
|
||||||
|
*
|
||||||
|
* Returns: true (1) if successful, otherwise false (0).
|
||||||
|
**/
|
||||||
bool ffemu_init_first(const ffemu_backend_t **backend, void **data,
|
bool ffemu_init_first(const ffemu_backend_t **backend, void **data,
|
||||||
const struct ffemu_params *params)
|
const struct ffemu_params *params)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
for (i = 0; ffemu_backends[i]; i++)
|
for (i = 0; ffemu_backends[i]; i++)
|
||||||
{
|
{
|
||||||
void *handle = ffemu_backends[i]->init(params);
|
void *handle = ffemu_backends[i]->init(params);
|
||||||
if (handle)
|
|
||||||
{
|
if (!handle)
|
||||||
*backend = ffemu_backends[i];
|
continue;
|
||||||
*data = handle;
|
|
||||||
return true;
|
*backend = ffemu_backends[i];
|
||||||
}
|
*data = handle;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -93,7 +93,27 @@ typedef struct ffemu_backend
|
|||||||
|
|
||||||
extern const ffemu_backend_t ffemu_ffmpeg;
|
extern const ffemu_backend_t ffemu_ffmpeg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ffemu_find_backend:
|
||||||
|
* @ident : Identifier of driver to find.
|
||||||
|
*
|
||||||
|
* Finds a recording driver with the name @ident.
|
||||||
|
*
|
||||||
|
* Returns: recording driver handle if successful, otherwise
|
||||||
|
* NULL.
|
||||||
|
**/
|
||||||
const ffemu_backend_t *ffemu_find_backend(const char *ident);
|
const ffemu_backend_t *ffemu_find_backend(const char *ident);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gfx_ctx_init_first:
|
||||||
|
* @backend : Recording backend handle.
|
||||||
|
* @data : Recording data handle.
|
||||||
|
* @params : Recording info parameters.
|
||||||
|
*
|
||||||
|
* Finds first suitable recording context driver and initializes.
|
||||||
|
*
|
||||||
|
* Returns: true (1) if successful, otherwise false (0).
|
||||||
|
**/
|
||||||
bool ffemu_init_first(const ffemu_backend_t **backend, void **data,
|
bool ffemu_init_first(const ffemu_backend_t **backend, void **data,
|
||||||
const struct ffemu_params *params);
|
const struct ffemu_params *params);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user