mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-26 11:36:01 +00:00
Create overlay->alive
This commit is contained in:
parent
10c8c0198b
commit
2121f7a813
@ -127,6 +127,7 @@ struct input_overlay
|
||||
|
||||
enum overlay_image_transfer_status loading_status;
|
||||
bool blocked;
|
||||
bool alive;
|
||||
|
||||
struct overlay *overlays;
|
||||
const struct overlay *active;
|
||||
@ -169,15 +170,13 @@ input_overlay_state_t *input_overlay_get_state_ptr(void)
|
||||
return &overlay_st_ptr;
|
||||
}
|
||||
|
||||
bool input_overlay_is_active(void)
|
||||
bool input_overlay_data_is_active(void)
|
||||
{
|
||||
input_overlay_t *overlay = input_overlay_get_ptr();
|
||||
if (!overlay)
|
||||
return false;
|
||||
|
||||
if (overlay->state == OVERLAY_STATUS_ALIVE)
|
||||
return false;
|
||||
if (overlay->state == OVERLAY_STATUS_NONE)
|
||||
if (overlay->alive)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@ -937,7 +936,8 @@ bool input_overlay_new_done(input_overlay_t *ol)
|
||||
input_overlay_set_scale_factor(ol, ol->deferred.scale_factor);
|
||||
ol->next_index = (ol->index + 1) % ol->size;
|
||||
|
||||
ol->state = OVERLAY_STATUS_ALIVE;
|
||||
ol->state = OVERLAY_STATUS_NONE;
|
||||
ol->alive = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1394,7 +1394,7 @@ bool input_overlay_is_alive(input_overlay_t *ol)
|
||||
{
|
||||
if (!ol)
|
||||
return false;
|
||||
return ol->state == OVERLAY_STATUS_ALIVE;
|
||||
return ol->alive;
|
||||
}
|
||||
|
||||
enum overlay_status input_overlay_status(input_overlay_t *ol)
|
||||
|
@ -77,8 +77,7 @@ enum overlay_status
|
||||
OVERLAY_STATUS_DEFERRED_LOADING,
|
||||
OVERLAY_STATUS_DEFERRED_LOADING_RESOLVE,
|
||||
OVERLAY_STATUS_DEFERRED_DONE,
|
||||
OVERLAY_STATUS_DEFERRED_ERROR,
|
||||
OVERLAY_STATUS_ALIVE
|
||||
OVERLAY_STATUS_DEFERRED_ERROR
|
||||
};
|
||||
|
||||
enum overlay_image_transfer_status
|
||||
@ -223,7 +222,7 @@ input_overlay_t *input_overlay_get_ptr(void);
|
||||
|
||||
input_overlay_state_t *input_overlay_get_state_ptr(void);
|
||||
|
||||
bool input_overlay_is_active(void);
|
||||
bool input_overlay_data_is_active(void);
|
||||
|
||||
void input_overlay_free_ptr(void);
|
||||
|
||||
|
@ -153,7 +153,7 @@ bool rarch_main_data_active(void)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (input_overlay_is_active())
|
||||
if (input_overlay_data_is_active())
|
||||
active = true;
|
||||
#endif
|
||||
if (rarch_main_data_nbio_image_get_handle())
|
||||
|
@ -68,9 +68,6 @@ void rarch_main_data_overlay_iterate(bool is_thread)
|
||||
case OVERLAY_STATUS_DEFERRED_LOAD:
|
||||
input_overlay_load_overlays(ol);
|
||||
break;
|
||||
case OVERLAY_STATUS_NONE:
|
||||
case OVERLAY_STATUS_ALIVE:
|
||||
break;
|
||||
case OVERLAY_STATUS_DEFERRED_LOADING_RESOLVE:
|
||||
input_overlay_load_overlays_resolve_iterate(ol);
|
||||
break;
|
||||
@ -81,6 +78,7 @@ void rarch_main_data_overlay_iterate(bool is_thread)
|
||||
input_overlay_free(ol);
|
||||
break;
|
||||
default:
|
||||
case OVERLAY_STATUS_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user