Add RETRO_ENVIRONMENT_GET_INPUT_DEVICE_CAPABILITIES.

This commit is contained in:
Themaister 2013-11-02 21:39:43 +01:00
parent 3e8166bfa5
commit df4d0eb0cf
2 changed files with 18 additions and 0 deletions

View File

@ -764,6 +764,17 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
}
case RETRO_ENVIRONMENT_GET_INPUT_DEVICE_CAPABILITIES:
{
RARCH_LOG("Environ GET_INPUT_DEVICE_CAPABILITIES.\n");
uint64_t *mask = (uint64_t*)data;
if (driver.input && driver.input->get_capabilities && driver.input_data)
*mask = driver.input->get_capabilities(driver.input_data);
else
return false;
break;
}
// Private extensions for internal use, not part of libretro API.
case RETRO_ENVIRONMENT_SET_LIBRETRO_PATH:
RARCH_LOG("Environ (Private) SET_LIBRETRO_PATH.\n");

View File

@ -519,6 +519,13 @@ enum retro_mod
// struct retro_rumble_interface * --
// Gets an interface which is used by a libretro core to set state of rumble motors in controllers.
// A strong and weak motor is supported, and they can be controlled indepedently.
//
#define RETRO_ENVIRONMENT_GET_INPUT_DEVICE_CAPABILITIES 24
// uint64_t * --
// Gets a bitmask telling which device type are expected to be handled properly in a call to retro_input_state_t.
// Devices which are not handled or recognized always return 0 in retro_input_state_t.
// Example bitmask: caps = (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG).
// Should only be called in retro_run().
enum retro_rumble_effect