Beispiel #1
0
static void menu_input_key_bind_poll_bind_get_rested_axes(
      struct menu_bind_state *state, unsigned port)
{
   unsigned a;
   const input_device_driver_t     *joypad = 
      input_driver_get_joypad_driver();
   const input_device_driver_t *sec_joypad = 
      input_driver_get_sec_joypad_driver();

   if (!state || !joypad)
      return;

   /* poll only the relevant port */
   for (a = 0; a < MENU_MAX_AXES; a++)
      state->axis_state[port].rested_axes[a] = 
         input_joypad_axis_raw(joypad, port, a);
    
   if (sec_joypad)
   {
        /* poll only the relevant port */
        for (a = 0; a < MENU_MAX_AXES; a++)
            state->axis_state[port].rested_axes[a] = 
               input_joypad_axis_raw(sec_joypad, port, a);
   }
}
static void menu_input_key_bind_poll_bind_state(
      struct menu_bind_state *state,
      unsigned port,
      bool timed_out)
{
   rarch_joypad_info_t joypad_info;
   const input_device_driver_t *joypad     =
      input_driver_get_joypad_driver();
   const input_device_driver_t *sec_joypad =
      input_driver_get_sec_joypad_driver();

   if (!state)
      return;

   memset(state->state, 0, sizeof(state->state));

   joypad_info.joy_idx        = 0;
   joypad_info.auto_binds     = NULL;
   joypad_info.axis_threshold = 0.0f;

   state->skip = timed_out || current_input->input_state(current_input_data, joypad_info,
         NULL,
         0, RETRO_DEVICE_KEYBOARD, 0, RETROK_RETURN);

   menu_input_key_bind_poll_bind_state_internal(
         joypad, state, port, timed_out);

   if (sec_joypad)
      menu_input_key_bind_poll_bind_state_internal(
            sec_joypad, state, port, timed_out);
}
Beispiel #3
0
static void menu_input_key_bind_poll_bind_state(struct menu_bind_state *state, unsigned port,
      bool timed_out)
{
   const input_device_driver_t *joypad = input_driver_get_joypad_driver();
   const input_device_driver_t *sec_joypad = input_driver_get_sec_joypad_driver();

   if (!state)
      return;

   memset(state->state, 0, sizeof(state->state));
   state->skip = timed_out || input_driver_state(NULL, 0,
         RETRO_DEVICE_KEYBOARD, 0, RETROK_RETURN);
    
   menu_input_key_bind_poll_bind_state_internal(joypad, state, port, timed_out);
    
   if (sec_joypad)
      menu_input_key_bind_poll_bind_state_internal(sec_joypad, state, port, timed_out);
}