input_driver_poll; remove shadowed variable

menu_input_read_mouse_hw - cleanup + go through local pointer
variable for primary_joypad
This commit is contained in:
twinaphex 2021-08-29 18:41:58 +02:00
parent 540d192ecb
commit a9f1dd3647
1 changed files with 53 additions and 51 deletions

View File

@ -22077,8 +22077,6 @@ static void input_driver_poll(void)
bool poll_overlay = (p_rarch->overlay_ptr && p_rarch->overlay_ptr->alive);
#endif
input_mapper_t *handle = &p_rarch->input_driver_mapper;
const input_device_driver_t
*joypad = input_driver_st->primary_joypad;
float input_analog_deadzone = settings->floats.input_analog_deadzone;
float input_analog_sensitivity = settings->floats.input_analog_sensitivity;
@ -23099,11 +23097,16 @@ static int16_t menu_input_read_mouse_hw(
struct rarch_state *p_rarch,
enum menu_input_mouse_hw_id id)
{
input_driver_state_t *input_driver_st = &p_rarch->input_driver_state;
input_driver_t *current_input = input_driver_st->current_driver;
if (current_input->input_state)
{
rarch_joypad_info_t joypad_info;
unsigned type = 0;
unsigned device = RETRO_DEVICE_MOUSE;
input_driver_state_t *input_driver_st = &p_rarch->input_driver_state;
input_driver_t *current_input = input_driver_st->current_driver;
const input_device_driver_t
*joypad = input_driver_st->primary_joypad;
#ifdef HAVE_MFI
const input_device_driver_t
*sec_joypad = input_driver_st->secondary_joypad;
@ -23145,17 +23148,16 @@ static int16_t menu_input_read_mouse_hw(
type = RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN;
break;
}
if (!current_input->input_state)
return 0;
return current_input->input_state(
input_driver_st->current_data,
input_driver_st->primary_joypad,
joypad,
sec_joypad,
&joypad_info,
NULL,
p_rarch->keyboard_mapping_blocked,
0, device, 0, type);
}
return 0;
}
static void menu_input_get_mouse_hw_state(