mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Change menu_iterate return value to int
This commit is contained in:
parent
eb9eafe7e1
commit
3d68429aca
@ -289,7 +289,12 @@ static unsigned input_frame(uint64_t trigger_state)
|
||||
return MENU_ACTION_NOOP;
|
||||
}
|
||||
|
||||
bool menu_iterate(retro_input_t input,
|
||||
/* Returns:
|
||||
* 0 - Forcibly wake up the loop.
|
||||
* -1 - Quit out of iteration loop.
|
||||
*/
|
||||
|
||||
int menu_iterate(retro_input_t input,
|
||||
retro_input_t old_input, retro_input_t trigger_input)
|
||||
{
|
||||
unsigned action = MENU_ACTION_NOOP;
|
||||
@ -305,7 +310,7 @@ bool menu_iterate(retro_input_t input,
|
||||
| (1ULL << RETRO_DEVICE_ID_JOYPAD_R);
|
||||
|
||||
if (!driver.menu)
|
||||
return false;
|
||||
return -1;
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (BIND_PRESSED(trigger_input, RARCH_OVERLAY_NEXT))
|
||||
@ -361,9 +366,9 @@ bool menu_iterate(retro_input_t input,
|
||||
driver.menu_ctx->input_postprocess(input, old_input);
|
||||
|
||||
if (ret)
|
||||
return false;
|
||||
return -1;
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned menu_common_type_is(const char *label, unsigned type)
|
||||
|
@ -136,7 +136,8 @@ typedef enum
|
||||
|
||||
void *menu_init(const void *data);
|
||||
|
||||
bool menu_iterate(retro_input_t input, retro_input_t old_input, retro_input_t trigger_input);
|
||||
int menu_iterate(retro_input_t input,
|
||||
retro_input_t old_input, retro_input_t trigger_input);
|
||||
|
||||
void menu_free(void *data);
|
||||
|
||||
|
@ -3258,10 +3258,10 @@ int rarch_main_iterate(void)
|
||||
|
||||
if (g_extern.is_menu)
|
||||
{
|
||||
if (!menu_iterate(input, old_input, trigger_input))
|
||||
if (menu_iterate(input, old_input, trigger_input) == -1)
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
|
||||
|
||||
if ( ! input )
|
||||
if (!input)
|
||||
ret = 1;
|
||||
goto success;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user