mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(Overlay) Add some logic
This commit is contained in:
parent
68fe4bcec6
commit
2390e17fc7
@ -604,7 +604,6 @@ struct global
|
||||
struct
|
||||
{
|
||||
bool is_blocking;
|
||||
bool is_processing;
|
||||
bool is_finished;
|
||||
transfer_cb_t cb;
|
||||
msg_queue_t *msg_queue;
|
||||
|
@ -73,6 +73,7 @@ enum overlay_status
|
||||
OVERLAY_STATUS_NONE = 0,
|
||||
OVERLAY_STATUS_DEFERRED_LOAD,
|
||||
OVERLAY_STATUS_DEFERRED_LOADING_IMAGE,
|
||||
OVERLAY_STATUS_DEFERRED_LOADING_IMAGE_PROCESS,
|
||||
OVERLAY_STATUS_DEFERRED_LOADING,
|
||||
OVERLAY_STATUS_DEFERRED_LOADING_RESOLVE,
|
||||
OVERLAY_STATUS_DEFERRED_DONE,
|
||||
@ -80,6 +81,14 @@ enum overlay_status
|
||||
OVERLAY_STATUS_ALIVE,
|
||||
};
|
||||
|
||||
enum overlay_image_transfer_status
|
||||
{
|
||||
OVERLAY_IMAGE_TRANSFER_NONE = 0,
|
||||
OVERLAY_IMAGE_TRANSFER_BUSY,
|
||||
OVERLAY_IMAGE_TRANSFER_DONE,
|
||||
OVERLAY_IMAGE_TRANSFER_ERROR,
|
||||
};
|
||||
|
||||
struct overlay_desc
|
||||
{
|
||||
float x;
|
||||
@ -135,6 +144,7 @@ struct input_overlay
|
||||
const video_overlay_interface_t *iface;
|
||||
bool enable;
|
||||
|
||||
enum overlay_image_transfer_status loading_status;
|
||||
bool blocked;
|
||||
|
||||
struct overlay *overlays;
|
||||
|
@ -900,6 +900,8 @@ void rarch_main_iterate_overlay_state(void)
|
||||
case OVERLAY_STATUS_DEFERRED_ERROR:
|
||||
input_overlay_free(driver.overlay);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,13 @@ static int cb_image_overlay(void *data, size_t len)
|
||||
{
|
||||
g_extern.images.is_finished = true;
|
||||
g_extern.images.is_blocking = true;
|
||||
g_extern.images.is_processing = true;
|
||||
|
||||
if (!driver.overlay)
|
||||
return -1;
|
||||
|
||||
RARCH_LOG("Gets here.\n");
|
||||
|
||||
driver.overlay->loading_status = OVERLAY_IMAGE_TRANSFER_DONE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user