Create RARCH_INPUT_CTL_HAS_CAPABILITIES

This commit is contained in:
twinaphex 2015-11-28 17:54:50 +01:00
parent 8ce6582fa4
commit ed71129ee6
3 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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,