static retro_input_t input_driver_keys_pressed(void) { unsigned key; retro_input_t ret = 0; for (key = 0; key < RARCH_BIND_LIST_END; key++) { bool state = false; if ((!input_driver_ctl(RARCH_INPUT_CTL_IS_LIBRETRO_INPUT_BLOCKED, NULL) && ((key < RARCH_FIRST_META_KEY))) || !input_driver_ctl(RARCH_INPUT_CTL_IS_HOTKEY_BLOCKED, NULL)) state = input_driver_ctl(RARCH_INPUT_CTL_KEY_PRESSED, &key); if (key >= RARCH_FIRST_META_KEY) state |= current_input->meta_key_pressed(current_input_data, key); #ifdef HAVE_OVERLAY state |= input_overlay_key_pressed(key); #endif #ifdef HAVE_COMMAND if (input_driver_command) state |= rarch_cmd_get(input_driver_command, key); #endif #ifdef HAVE_NETWORK_GAMEPAD if (input_driver_remote) state |= input_remote_key_pressed(key,0); #endif if (state) ret |= (UINT64_C(1) << key); } return ret; }
retro_input_t input_driver_keys_pressed(void) { int key; retro_input_t ret = 0; driver_t *driver = driver_get_ptr(); const input_driver_t *input = input_get_ptr(driver); for (key = 0; key < RARCH_BIND_LIST_END; key++) { bool state = false; if ((!driver->block_libretro_input && ((key < RARCH_FIRST_META_KEY))) || !driver->block_hotkey) state = input->key_pressed(driver->input_data, key); if (key >= RARCH_FIRST_META_KEY) state |= input->meta_key_pressed(driver->input_data, key); #ifdef HAVE_OVERLAY state |= input_overlay_key_pressed(key); #endif #ifdef HAVE_COMMAND if (driver->command) state |= rarch_cmd_get(driver->command, key); #endif if (state) ret |= (UINT64_C(1) << key); } return ret; }
retro_input_t input_driver_keys_pressed(uint64_t *device_type) { int key; retro_input_t ret = 0; driver_t *driver = driver_get_ptr(); const input_driver_t *input = input_get_ptr(driver); for (key = 0; key < RARCH_BIND_LIST_END; key++) { bool state = false; enum input_device_type device = INPUT_DEVICE_TYPE_NONE; if ((!driver->block_libretro_input && ((key < RARCH_FIRST_META_KEY))) || !driver->block_hotkey) state = input->key_pressed(driver->input_data, key, &device); if (key >= RARCH_FIRST_META_KEY) state |= input->meta_key_pressed(driver->input_data, key, &device); if (device == INPUT_DEVICE_TYPE_JOYPAD) BIT64_SET(*device_type, key); #ifdef HAVE_OVERLAY state |= input_overlay_key_pressed(key); #endif #ifdef HAVE_COMMAND if (driver->command) state |= rarch_cmd_get(driver->command, key); #endif if (state) ret |= (UINT64_C(1) << key); } return ret; }
static inline retro_input_t input_keys_pressed(void) { static const struct retro_keybind *binds[MAX_PLAYERS] = { g_settings.input.binds[0], g_settings.input.binds[1], g_settings.input.binds[2], g_settings.input.binds[3], g_settings.input.binds[4], g_settings.input.binds[5], g_settings.input.binds[6], g_settings.input.binds[7], g_settings.input.binds[8], g_settings.input.binds[9], g_settings.input.binds[10], g_settings.input.binds[11], g_settings.input.binds[12], g_settings.input.binds[13], g_settings.input.binds[14], g_settings.input.binds[15], }; retro_input_t ret = 0; int i, key; g_extern.turbo_count++; check_block_hotkey(driver.input->key_pressed(driver.input_data, RARCH_ENABLE_HOTKEY)); input_push_analog_dpad((struct retro_keybind*)binds[0], (g_settings.input.analog_dpad_mode[0] == ANALOG_DPAD_NONE) ? ANALOG_DPAD_LSTICK : g_settings.input.analog_dpad_mode[0]); for (i = 0; i < MAX_PLAYERS; i++) { input_push_analog_dpad(g_settings.input.autoconf_binds[i], g_settings.input.analog_dpad_mode[i]); g_extern.turbo_frame_enable[i] = driver.block_libretro_input ? 0 : driver.input->input_state(driver.input_data, binds, i, RETRO_DEVICE_JOYPAD, 0, RARCH_TURBO_ENABLE); } for (key = 0; key < RARCH_BIND_LIST_END; key++) { bool state = false; if ( (!driver.block_libretro_input && (key < RARCH_FIRST_META_KEY)) || !driver.block_hotkey) state = driver.input->key_pressed(driver.input_data, key); #ifdef HAVE_OVERLAY state = state || (driver.overlay_state.buttons & (1ULL << key)); #endif #ifdef HAVE_COMMAND if (driver.command) state = state || rarch_cmd_get(driver.command, key); #endif if (state) ret |= (1ULL << key); } input_pop_analog_dpad((struct retro_keybind*)binds[0]); for (i = 0; i < MAX_PLAYERS; i++) input_pop_analog_dpad(g_settings.input.autoconf_binds[i]); return ret; }