mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(runloop_data.c) More refactoring
This commit is contained in:
parent
4a905e61fc
commit
3fe85d150b
@ -306,13 +306,19 @@ static int rarch_main_iterate_nbio_poll(void)
|
|||||||
struct nbio_t* handle;
|
struct nbio_t* handle;
|
||||||
char elem0[PATH_MAX_LENGTH], elem1[PATH_MAX_LENGTH];
|
char elem0[PATH_MAX_LENGTH], elem1[PATH_MAX_LENGTH];
|
||||||
struct string_list *str_list = NULL;
|
struct string_list *str_list = NULL;
|
||||||
const char *path = msg_queue_pull(g_extern.nbio.msg_queue);
|
nbio_handle_t *nbio = (nbio_handle_t*)&g_extern.nbio;
|
||||||
|
const char *path = NULL;
|
||||||
|
|
||||||
|
if (!nbio)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
path = msg_queue_pull(nbio->msg_queue);
|
||||||
|
|
||||||
if (!path)
|
if (!path)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Can only deal with one NBIO transfer at a time for now */
|
/* Can only deal with one NBIO transfer at a time for now */
|
||||||
if (g_extern.nbio.handle)
|
if (nbio->handle)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
str_list = string_split(path, "|");
|
str_list = string_split(path, "|");
|
||||||
@ -333,16 +339,16 @@ static int rarch_main_iterate_nbio_poll(void)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_extern.nbio.handle = handle;
|
nbio->handle = handle;
|
||||||
g_extern.nbio.is_blocking = false;
|
nbio->is_blocking = false;
|
||||||
g_extern.nbio.is_finished = false;
|
nbio->is_finished = false;
|
||||||
g_extern.nbio.cb = &cb_nbio_default;
|
nbio->cb = &cb_nbio_default;
|
||||||
|
|
||||||
if (elem1[0] != '\0')
|
if (elem1[0] != '\0')
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
if (!strcmp(elem1, "cb_menu_wallpaper"))
|
if (!strcmp(elem1, "cb_menu_wallpaper"))
|
||||||
g_extern.nbio.cb = &cb_nbio_image_menu_wallpaper;
|
nbio->cb = &cb_nbio_image_menu_wallpaper;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user