mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
Move more code to do with core options to runloop.c
This commit is contained in:
parent
ebb0906f3e
commit
99824bcad0
@ -336,11 +336,8 @@ static int core_setting_left(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||
|
||||
(void)label;
|
||||
|
||||
core_option_prev(system->core_options, idx);
|
||||
runloop_ctl(RUNLOOP_CTL_CORE_OPTION_PREV, &idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -353,14 +353,8 @@ int core_setting_right(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||
|
||||
(void)label;
|
||||
|
||||
core_option_next(system->core_options, idx);
|
||||
|
||||
if (ui_companion_is_on_foreground())
|
||||
ui_companion_driver_notify_refresh();
|
||||
runloop_ctl(RUNLOOP_CTL_CORE_OPTION_NEXT, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
20
runloop.c
20
runloop.c
@ -984,6 +984,26 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
case RUNLOOP_CTL_IS_CORE_OPTION_UPDATED:
|
||||
return system->core_options ?
|
||||
core_option_updated(system->core_options) : false;
|
||||
case RUNLOOP_CTL_CORE_OPTION_PREV:
|
||||
{
|
||||
unsigned *idx = (unsigned*)data;
|
||||
if (!idx)
|
||||
return false;
|
||||
core_option_prev(system->core_options, *idx);
|
||||
if (ui_companion_is_on_foreground())
|
||||
ui_companion_driver_notify_refresh();
|
||||
}
|
||||
return true;
|
||||
case RUNLOOP_CTL_CORE_OPTION_NEXT:
|
||||
{
|
||||
unsigned *idx = (unsigned*)data;
|
||||
if (!idx)
|
||||
return false;
|
||||
core_option_next(system->core_options, *idx);
|
||||
if (ui_companion_is_on_foreground())
|
||||
ui_companion_driver_notify_refresh();
|
||||
}
|
||||
return true;
|
||||
case RUNLOOP_CTL_CORE_OPTIONS_GET:
|
||||
{
|
||||
struct retro_variable *var = (struct retro_variable*)data;
|
||||
|
@ -87,6 +87,8 @@ enum runloop_ctl_state
|
||||
RUNLOOP_CTL_MSG_QUEUE_UNLOCK,
|
||||
RUNLOOP_CTL_MSG_QUEUE_FREE,
|
||||
RUNLOOP_CTL_IS_CORE_OPTION_UPDATED,
|
||||
RUNLOOP_CTL_CORE_OPTION_PREV,
|
||||
RUNLOOP_CTL_CORE_OPTION_NEXT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_GET,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_INIT,
|
||||
RUNLOOP_CTL_CORE_OPTIONS_DEINIT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user