mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 06:40:48 +00:00
Handle cb return error code for task cancellation
This commit is contained in:
parent
3cf591ec09
commit
7aadde73d8
@ -55,7 +55,8 @@ static int task_file_transfer_iterate_parse(nbio_handle_t *nbio)
|
|||||||
if (nbio->cb)
|
if (nbio->cb)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
nbio->cb(nbio, len);
|
if (nbio->cb(nbio, len) == -1)
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -68,7 +69,8 @@ void rarch_task_file_load_handler(retro_task_t *task)
|
|||||||
switch (nbio->status)
|
switch (nbio->status)
|
||||||
{
|
{
|
||||||
case NBIO_STATUS_TRANSFER_PARSE:
|
case NBIO_STATUS_TRANSFER_PARSE:
|
||||||
task_file_transfer_iterate_parse(nbio);
|
if (task_file_transfer_iterate_parse(nbio) == -1)
|
||||||
|
goto task_finished;
|
||||||
nbio->status = NBIO_STATUS_TRANSFER_PARSE_FREE;
|
nbio->status = NBIO_STATUS_TRANSFER_PARSE_FREE;
|
||||||
break;
|
break;
|
||||||
case NBIO_STATUS_TRANSFER:
|
case NBIO_STATUS_TRANSFER:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user