mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-22 01:07:37 +00:00
Create input_driver_poll
This commit is contained in:
parent
47fae5542d
commit
71e927020c
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user