From 17e78909d51188d3d3469177724e7861c7fade10 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 16 Sep 2016 12:43:09 +0200 Subject: [PATCH] Cleanups --- menu/menu_input.c | 8 +++----- runloop.c | 7 ++++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/menu/menu_input.c b/menu/menu_input.c index 5e7801cf55..9503256d52 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -553,15 +553,13 @@ unsigned menu_event(retro_input_t input, if (!menu_input) return 0; - core_poll(); - - /* don't run anything first frame, only capture held inputs - * for old_input_state. */ - if (input.state) { if (!first_held) { + /* don't run anything first frame, only capture held inputs + * for old_input_state. */ + first_held = true; menu_input->delay.timer = initial_held ? 12 : 6; menu_input->delay.count = 0; diff --git a/runloop.c b/runloop.c index 9a39afad95..9c68d00dad 100644 --- a/runloop.c +++ b/runloop.c @@ -1549,12 +1549,14 @@ int runloop_iterate(unsigned *sleep_ms) return -1; } + core_poll(); + #ifdef HAVE_MENU if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { int ret = runloop_iterate_menu((enum menu_action) - menu_event(cmd.state[0], cmd.state[2]), - sleep_ms); + menu_event(cmd.state[0], cmd.state[2]), + sleep_ms); if (ret == -1) goto end; @@ -1566,7 +1568,6 @@ int runloop_iterate(unsigned *sleep_ms) if (!runloop_check_state(&cmd, &runloop_shader_dir)) { /* RetroArch has been paused. */ - core_poll(); *sleep_ms = 10; return 1; }