Create input_driver_poll

This commit is contained in:
twinaphex 2015-03-23 03:17:43 +01:00
parent 47fae5542d
commit 71e927020c
4 changed files with 11 additions and 2 deletions

View File

@ -224,3 +224,10 @@ int16_t input_driver_state(const struct retro_keybind **retro_keybinds,
port, device, index, id);
return 0;
}
void input_driver_poll(void)
{
driver_t *driver = driver_get_ptr();
if (driver->input && driver->input_data && driver->input->poll)
driver->input->poll(driver->input_data);
}

View File

@ -140,6 +140,8 @@ retro_input_t input_driver_keys_pressed(void);
int16_t input_driver_state(const struct retro_keybind **retro_keybinds,
unsigned port, unsigned device, unsigned index, unsigned id);
void input_driver_poll(void);
#ifdef __cplusplus
}
#endif

View File

@ -643,7 +643,7 @@ static void input_poll(void)
driver_t *driver = driver_get_ptr();
settings_t *settings = config_get_ptr();
driver->input->poll(driver->input_data);
input_driver_poll();
#ifdef HAVE_OVERLAY
if (driver->overlay)

View File

@ -2405,7 +2405,7 @@ bool rarch_main_command(unsigned cmd)
driver->video_cache_context = false;
/* Poll input to avoid possibly stale data to corrupt things. */
driver->input->poll(driver->input_data);
input_driver_poll();
#ifdef HAVE_MENU
runloop->frames.video.current.menu.framebuf.dirty = true;