mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Use rarch_main_data_nbio_get_handle and rarch_main_data_nbio_image_get_handle
This commit is contained in:
parent
a1a4bc4057
commit
664592b354
@ -121,10 +121,6 @@ bool rarch_main_data_active(data_runloop_t *runloop)
|
||||
bool db_active = false;
|
||||
|
||||
driver_t *driver = driver_get_ptr();
|
||||
nbio_handle_t *nbio = (nbio_handle_t*)rarch_main_data_nbio_get_ptr();
|
||||
#ifdef HAVE_RPNG
|
||||
nbio_image_handle_t *image = nbio ? &nbio->image : NULL;
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
http_handle_t *http = runloop ? &runloop->http : NULL;
|
||||
struct http_connection_t *http_conn = http ? http->connection.handle : NULL;
|
||||
@ -141,11 +137,9 @@ bool rarch_main_data_active(data_runloop_t *runloop)
|
||||
&& driver->overlay->state != OVERLAY_STATUS_NONE);
|
||||
active = active || overlay_active;
|
||||
#endif
|
||||
#ifdef HAVE_RPNG
|
||||
image_active = image && image->handle != NULL;
|
||||
image_active = rarch_main_data_nbio_image_get_handle() != NULL;
|
||||
active = active || image_active;
|
||||
#endif
|
||||
nbio_active = nbio->handle != NULL;
|
||||
nbio_active = rarch_main_data_nbio_get_handle() != NULL;
|
||||
active = active || nbio_active;
|
||||
#ifdef HAVE_NETWORKING
|
||||
http_active = http && http->handle != NULL;
|
||||
|
@ -41,12 +41,36 @@ msg_queue_t *rarch_main_data_nbio_get_msg_queue_ptr(void)
|
||||
return nbio->msg_queue;
|
||||
}
|
||||
|
||||
void *rarch_main_data_nbio_get_handle(void)
|
||||
{
|
||||
nbio_handle_t *nbio = rarch_main_data_nbio_get_ptr();
|
||||
if (!nbio)
|
||||
return NULL;
|
||||
return nbio->handle;
|
||||
}
|
||||
|
||||
msg_queue_t *rarch_main_data_nbio_image_get_msg_queue_ptr(void)
|
||||
{
|
||||
nbio_handle_t *nbio = rarch_main_data_nbio_get_ptr();
|
||||
if (!nbio)
|
||||
return NULL;
|
||||
#ifdef HAVE_RPNG
|
||||
return nbio->image.msg_queue;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void *rarch_main_data_nbio_image_get_handle(void)
|
||||
{
|
||||
nbio_handle_t *nbio = rarch_main_data_nbio_get_ptr();
|
||||
if (!nbio)
|
||||
return NULL;
|
||||
#ifdef HAVE_RPNG
|
||||
return nbio->image.handle;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -36,6 +36,10 @@ msg_queue_t *rarch_main_data_nbio_image_get_msg_queue_ptr(void);
|
||||
|
||||
void *rarch_main_data_nbio_get_ptr(void);
|
||||
|
||||
void *rarch_main_data_nbio_get_handle(void);
|
||||
|
||||
void *rarch_main_data_nbio_image_get_handle(void);
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
/**
|
||||
* rarch_main_data_http_iterate_transfer:
|
||||
|
Loading…
x
Reference in New Issue
Block a user