Prevent input_driver_poll from being called more than once per

frame - would only regularly happen when 'pause when menu activated'
was turned off and we went to the menu, and maybe a slight few
times inside specific cores, but nothing major
This commit is contained in:
twinaphex 2019-08-12 10:27:57 +02:00
parent 0bc99c8111
commit 15513c7752

View File

@ -10641,6 +10641,11 @@ static void input_driver_poll(void)
settings_t *settings = configuration_settings;
uint8_t max_users = (uint8_t)input_driver_max_users;
input_bits_t current_inputs[MAX_USERS];
static unsigned prev_frame_count = 0;
if (video_driver_frame_count == prev_frame_count)
return;
prev_frame_count = video_driver_frame_count;
current_input->poll(current_input_data);