mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
(Data runloop) Cleanups
This commit is contained in:
parent
1535f7d1c2
commit
5bdbe5a3b0
@ -399,14 +399,11 @@ static int rarch_main_data_nbio_iterate_transfer(nbio_handle_t *nbio)
|
|||||||
for (i = 0; i < nbio->pos_increment; i++)
|
for (i = 0; i < nbio->pos_increment; i++)
|
||||||
{
|
{
|
||||||
if (nbio_iterate(nbio->handle))
|
if (nbio_iterate(nbio->handle))
|
||||||
goto error;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
nbio->frame_count++;
|
nbio->frame_count++;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rarch_main_data_nbio_iterate_parse_free(nbio_handle_t *nbio)
|
static int rarch_main_data_nbio_iterate_parse_free(nbio_handle_t *nbio)
|
||||||
@ -448,20 +445,20 @@ void rarch_main_data_nbio_iterate(bool is_thread, void *data)
|
|||||||
|
|
||||||
switch (nbio->status)
|
switch (nbio->status)
|
||||||
{
|
{
|
||||||
case NBIO_STATUS_TRANSFER:
|
|
||||||
if (rarch_main_data_nbio_iterate_transfer(nbio) == -1)
|
|
||||||
nbio->status = NBIO_STATUS_TRANSFER_PARSE;
|
|
||||||
break;
|
|
||||||
case NBIO_STATUS_TRANSFER_PARSE:
|
case NBIO_STATUS_TRANSFER_PARSE:
|
||||||
rarch_main_data_nbio_iterate_parse(nbio);
|
rarch_main_data_nbio_iterate_parse(nbio);
|
||||||
nbio->status = NBIO_STATUS_TRANSFER_PARSE_FREE;
|
nbio->status = NBIO_STATUS_TRANSFER_PARSE_FREE;
|
||||||
break;
|
break;
|
||||||
|
case NBIO_STATUS_TRANSFER:
|
||||||
|
if (rarch_main_data_nbio_iterate_transfer(nbio) == -1)
|
||||||
|
nbio->status = NBIO_STATUS_TRANSFER_PARSE;
|
||||||
|
break;
|
||||||
case NBIO_STATUS_TRANSFER_PARSE_FREE:
|
case NBIO_STATUS_TRANSFER_PARSE_FREE:
|
||||||
rarch_main_data_nbio_iterate_parse_free(nbio);
|
rarch_main_data_nbio_iterate_parse_free(nbio);
|
||||||
nbio->status = NBIO_STATUS_POLL;
|
nbio->status = NBIO_STATUS_POLL;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
case NBIO_STATUS_POLL:
|
case NBIO_STATUS_POLL:
|
||||||
|
default:
|
||||||
if (rarch_main_data_nbio_iterate_poll(nbio) == 0)
|
if (rarch_main_data_nbio_iterate_poll(nbio) == 0)
|
||||||
nbio->status = NBIO_STATUS_TRANSFER;
|
nbio->status = NBIO_STATUS_TRANSFER;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user