Move early return check to input_driver.c

This commit is contained in:
twinaphex 2017-01-01 04:17:58 +01:00
parent 6d4659a902
commit 0ec6ef75df
2 changed files with 2 additions and 7 deletions

View File

@ -287,7 +287,7 @@ void input_poll(void)
} }
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
if (overlay_ptr) if (overlay_ptr && input_overlay_is_alive(overlay_ptr))
input_poll_overlay(overlay_ptr, settings->input.overlay_opacity); input_poll_overlay(overlay_ptr, settings->input.overlay_opacity);
#endif #endif

View File

@ -604,12 +604,7 @@ void input_poll_overlay(input_overlay_t *ol, float opacity)
uint16_t key_mod = 0; uint16_t key_mod = 0;
bool polled = false; bool polled = false;
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
input_overlay_state_t *ol_state = NULL; input_overlay_state_t *ol_state = &ol->overlay_state;
if (!input_overlay_is_alive(ol))
return;
ol_state = &ol->overlay_state;
if (!ol_state) if (!ol_state)
return; return;