mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
setting_handler - cleanups
This commit is contained in:
parent
bbfbdf7b9d
commit
4aa2953852
@ -96,7 +96,6 @@ int menu_setting_generic(rarch_setting_t *setting)
|
|||||||
|
|
||||||
static int setting_handler(rarch_setting_t *setting, unsigned action)
|
static int setting_handler(rarch_setting_t *setting, unsigned action)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
if (!setting)
|
if (!setting)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -105,43 +104,28 @@ static int setting_handler(rarch_setting_t *setting, unsigned action)
|
|||||||
case MENU_ACTION_UP:
|
case MENU_ACTION_UP:
|
||||||
case MENU_ACTION_DOWN:
|
case MENU_ACTION_DOWN:
|
||||||
if (setting->action_up_or_down)
|
if (setting->action_up_or_down)
|
||||||
{
|
return setting->action_up_or_down(setting, action);
|
||||||
setting->action_up_or_down(setting, action);
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_ACTION_LEFT:
|
case MENU_ACTION_LEFT:
|
||||||
case MENU_ACTION_RIGHT:
|
case MENU_ACTION_RIGHT:
|
||||||
if (setting->action_toggle)
|
if (setting->action_toggle)
|
||||||
{
|
return setting->action_toggle(setting, action, true);
|
||||||
setting->action_toggle(setting, action, true);
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_ACTION_OK:
|
case MENU_ACTION_OK:
|
||||||
if (setting->action_ok)
|
if (setting->action_ok)
|
||||||
{
|
return setting->action_ok(setting, action);
|
||||||
setting->action_ok(setting, action);
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_ACTION_CANCEL:
|
case MENU_ACTION_CANCEL:
|
||||||
if (setting->action_cancel)
|
if (setting->action_cancel)
|
||||||
{
|
return setting->action_cancel(setting, action);
|
||||||
setting->action_cancel(setting, action);
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case MENU_ACTION_START:
|
case MENU_ACTION_START:
|
||||||
if (setting->action_start)
|
if (setting->action_start)
|
||||||
{
|
return setting->action_start(setting);
|
||||||
setting->action_start(setting);
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int menu_setting_handler(rarch_setting_t *setting, unsigned action)
|
int menu_setting_handler(rarch_setting_t *setting, unsigned action)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user