More hacks from input_overlay.c removed

This commit is contained in:
twinaphex 2016-11-27 15:12:48 +01:00
parent bbb2ffea9c
commit 7f339a8f84
4 changed files with 7 additions and 12 deletions

View File

@ -408,7 +408,7 @@ void input_poll(void)
} }
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
input_poll_overlay(NULL, settings->input.overlay_opacity); input_poll_overlay(overlay_ptr, settings->input.overlay_opacity);
#endif #endif
#ifdef HAVE_COMMAND #ifdef HAVE_COMMAND

View File

@ -584,11 +584,9 @@ void input_overlay_set_alpha_mod(float mod)
bool input_overlay_is_alive(input_overlay_t *ol) bool input_overlay_is_alive(input_overlay_t *ol)
{ {
if (!ol) if (ol)
ol = overlay_ptr; return ol->alive;
if (!ol) return false;
return false;
return ol->alive;
} }
bool input_overlay_key_pressed(int key) bool input_overlay_key_pressed(int key)
@ -614,9 +612,6 @@ void input_poll_overlay(input_overlay_t *ol, float opacity)
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 = NULL;
if (!ol)
ol = overlay_ptr;
if (!input_overlay_is_alive(ol)) if (!input_overlay_is_alive(ol))
return; return;

View File

@ -394,7 +394,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
if (!mouse_enabled) if (!mouse_enabled)
mouse_enabled = !(settings->input.overlay_enable mouse_enabled = !(settings->input.overlay_enable
&& input_overlay_is_alive(NULL)); && input_overlay_is_alive(overlay_ptr));
#endif #endif
if (!(menu_input = menu_input_get_ptr())) if (!(menu_input = menu_input_get_ptr()))

View File

@ -127,7 +127,7 @@ static int menu_input_mouse_post_iterate(uint64_t *input_mouse,
if ( if (
!settings->menu.mouse.enable !settings->menu.mouse.enable
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
|| (settings->input.overlay_enable && input_overlay_is_alive(NULL)) || (settings->input.overlay_enable && input_overlay_is_alive(overlay_ptr))
#endif #endif
) )
{ {
@ -376,7 +376,7 @@ static int menu_input_pointer_post_iterate(
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
if (!check_overlay) if (!check_overlay)
check_overlay = (settings->input.overlay_enable check_overlay = (settings->input.overlay_enable
&& input_overlay_is_alive(NULL)); && input_overlay_is_alive(overlay_ptr));
#endif #endif
if (check_overlay) if (check_overlay)