mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
Move some code from driver.c to input_context.c
This commit is contained in:
parent
6b3a67d5ea
commit
63281f8ca1
30
driver.c
30
driver.c
@ -40,36 +40,6 @@
|
||||
|
||||
driver_t driver;
|
||||
|
||||
/**
|
||||
* joypad_driver_find_handle:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: handle to joypad driver at index. Can be NULL
|
||||
* if nothing found.
|
||||
**/
|
||||
static const void *joypad_driver_find_handle(int index)
|
||||
{
|
||||
const void *drv = joypad_drivers[index];
|
||||
if (!drv)
|
||||
return NULL;
|
||||
return drv;
|
||||
}
|
||||
|
||||
/**
|
||||
* joypad_driver_find_ident:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: Human-readable identifier of joypad driver at index. Can be NULL
|
||||
* if nothing found.
|
||||
**/
|
||||
static const char *joypad_driver_find_ident(int index)
|
||||
{
|
||||
const rarch_joypad_driver_t *drv = joypad_drivers[index];
|
||||
if (!drv)
|
||||
return NULL;
|
||||
return drv->ident;
|
||||
}
|
||||
|
||||
/**
|
||||
* find_driver_nonempty:
|
||||
* @label : string of driver type to be found.
|
||||
|
2
driver.h
2
driver.h
@ -471,8 +471,6 @@ extern driver_t driver;
|
||||
**/
|
||||
int find_driver_index(const char * label, const char *drv);
|
||||
|
||||
extern rarch_joypad_driver_t *joypad_drivers[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <string/string_list.h>
|
||||
#include "../general.h"
|
||||
|
||||
rarch_joypad_driver_t *joypad_drivers[] = {
|
||||
static rarch_joypad_driver_t *joypad_drivers[] = {
|
||||
#ifdef __CELLOS_LV2__
|
||||
&ps3_joypad,
|
||||
#endif
|
||||
@ -71,6 +71,36 @@ rarch_joypad_driver_t *joypad_drivers[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
/**
|
||||
* joypad_driver_find_handle:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: handle to joypad driver at index. Can be NULL
|
||||
* if nothing found.
|
||||
**/
|
||||
const void *joypad_driver_find_handle(int index)
|
||||
{
|
||||
const void *drv = joypad_drivers[index];
|
||||
if (!drv)
|
||||
return NULL;
|
||||
return drv;
|
||||
}
|
||||
|
||||
/**
|
||||
* joypad_driver_find_ident:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: Human-readable identifier of joypad driver at index. Can be NULL
|
||||
* if nothing found.
|
||||
**/
|
||||
const char *joypad_driver_find_ident(int index)
|
||||
{
|
||||
const rarch_joypad_driver_t *drv = joypad_drivers[index];
|
||||
if (!drv)
|
||||
return NULL;
|
||||
return drv->ident;
|
||||
}
|
||||
|
||||
/**
|
||||
* config_get_joypad_driver_options:
|
||||
*
|
||||
|
@ -59,6 +59,24 @@ extern rarch_joypad_driver_t android_joypad;
|
||||
extern rarch_joypad_driver_t qnx_joypad;
|
||||
extern rarch_joypad_driver_t null_joypad;
|
||||
|
||||
/**
|
||||
* joypad_driver_find_handle:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: handle to joypad driver at index. Can be NULL
|
||||
* if nothing found.
|
||||
**/
|
||||
const void *joypad_driver_find_handle(int index);
|
||||
|
||||
/**
|
||||
* joypad_driver_find_ident:
|
||||
* @index : index of driver to get handle to.
|
||||
*
|
||||
* Returns: Human-readable identifier of joypad driver at index. Can be NULL
|
||||
* if nothing found.
|
||||
**/
|
||||
const char *joypad_driver_find_ident(int index);
|
||||
|
||||
/**
|
||||
* config_get_joypad_driver_options:
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user