mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Create RARCH_INPUT_CTL_HAS_CAPABILITIES
This commit is contained in:
parent
8ce6582fa4
commit
ed71129ee6
@ -1101,8 +1101,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
uint64_t *mask = (uint64_t*)data;
|
||||
|
||||
RARCH_LOG("Environ GET_INPUT_DEVICE_CAPABILITIES.\n");
|
||||
if (driver->input &&
|
||||
driver->input->get_capabilities && driver->input_data)
|
||||
if (input_driver_ctl(RARCH_INPUT_CTL_HAS_CAPABILITIES, NULL))
|
||||
*mask = input_driver_get_capabilities();
|
||||
else
|
||||
return false;
|
||||
|
@ -629,6 +629,11 @@ bool input_driver_ctl(enum rarch_input_ctl_state state, void *data)
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case RARCH_INPUT_CTL_HAS_CAPABILITIES:
|
||||
if (driver->input &&
|
||||
driver->input->get_capabilities && driver->input_data)
|
||||
return true;
|
||||
return false;
|
||||
case RARCH_INPUT_CTL_POLL:
|
||||
input->poll(driver->input_data);
|
||||
return true;
|
||||
|
@ -52,6 +52,7 @@ enum rarch_input_ctl_state
|
||||
RARCH_INPUT_CTL_INIT,
|
||||
RARCH_INPUT_CTL_DEINIT,
|
||||
RARCH_INPUT_CTL_DESTROY,
|
||||
RARCH_INPUT_CTL_HAS_CAPABILITIES,
|
||||
RARCH_INPUT_CTL_POLL,
|
||||
RARCH_INPUT_CTL_FIND_DRIVER,
|
||||
RARCH_INPUT_CTL_GRAB_STDIN,
|
||||
|
Loading…
Reference in New Issue
Block a user