mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 01:38:12 +00:00
(input_driver.c) Cleanups
This commit is contained in:
parent
3eed6fd464
commit
341579f7b6
@ -258,31 +258,32 @@ void input_driver_poll(void)
|
|||||||
|
|
||||||
const rarch_joypad_driver_t * input_driver_get_joypad_driver(void)
|
const rarch_joypad_driver_t * input_driver_get_joypad_driver(void)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
|
const input_driver_t *input = input_get_ptr(driver);
|
||||||
|
|
||||||
if (driver
|
if (input->get_joypad_driver)
|
||||||
&& driver->input
|
return input->get_joypad_driver(driver->input_data);
|
||||||
&& driver->input->get_joypad_driver)
|
|
||||||
return driver->input->get_joypad_driver(driver->input_data);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t input_driver_get_capabilities(void)
|
uint64_t input_driver_get_capabilities(void)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
|
const input_driver_t *input = input_get_ptr(driver);
|
||||||
|
|
||||||
if (driver && driver->input)
|
if (input->get_capabilities)
|
||||||
return driver->input->get_capabilities(driver->input_data);
|
return input->get_capabilities(driver->input_data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool input_driver_grab_mouse(bool state)
|
bool input_driver_grab_mouse(bool state)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
|
const input_driver_t *input = input_get_ptr(driver);
|
||||||
|
|
||||||
if (driver && driver->input)
|
if (input->grab_mouse)
|
||||||
{
|
{
|
||||||
driver->input->grab_mouse(driver->input_data, state);
|
input->grab_mouse(driver->input_data, state);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user