mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Update action toggle handler
This commit is contained in:
parent
184879f2bd
commit
eb63e78cf6
@ -54,7 +54,7 @@ static void setting_handler(rarch_setting_t *setting, unsigned action)
|
||||
case MENU_ACTION_LEFT:
|
||||
case MENU_ACTION_RIGHT:
|
||||
if (setting->action_toggle)
|
||||
setting->action_toggle(setting, action);
|
||||
setting->action_toggle(setting, action, false);
|
||||
break;
|
||||
case MENU_ACTION_OK:
|
||||
if (setting->action_ok)
|
||||
@ -79,7 +79,7 @@ int menu_setting_handler(rarch_setting_t *setting, unsigned action)
|
||||
}
|
||||
|
||||
static int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
unsigned type, unsigned action)
|
||||
unsigned type, unsigned action, bool wraparound)
|
||||
{
|
||||
if (!setting)
|
||||
return -1;
|
||||
@ -128,5 +128,6 @@ int menu_setting_set(unsigned type, const char *label,
|
||||
if (!setting)
|
||||
return 0;
|
||||
|
||||
return menu_action_handle_setting(setting, type, action);
|
||||
return menu_action_handle_setting(setting,
|
||||
type, action, wraparound);
|
||||
}
|
||||
|
@ -472,7 +472,8 @@ static int setting_data_bind_action_start(void *data)
|
||||
*
|
||||
* Returns: 0 on success, -1 on error.
|
||||
**/
|
||||
static int setting_data_action_toggle_analog_dpad_mode(void *data, unsigned action)
|
||||
static int setting_data_action_toggle_analog_dpad_mode(void *data,
|
||||
unsigned action, bool wraparound)
|
||||
{
|
||||
unsigned port = 0;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
@ -512,7 +513,7 @@ static int setting_data_action_toggle_analog_dpad_mode(void *data, unsigned acti
|
||||
* Returns: 0 on success, -1 on error.
|
||||
**/
|
||||
static int setting_data_action_toggle_libretro_device_type(
|
||||
void *data, unsigned action)
|
||||
void *data, unsigned action, bool wraparound)
|
||||
{
|
||||
unsigned current_device, current_idx, i, devices[128],
|
||||
types = 0, port = 0;
|
||||
@ -591,7 +592,7 @@ static int setting_data_action_toggle_libretro_device_type(
|
||||
* Returns: 0 on success, -1 on error.
|
||||
**/
|
||||
static int setting_data_action_toggle_savestates(
|
||||
void *data, unsigned action)
|
||||
void *data, unsigned action, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
@ -624,7 +625,8 @@ static int setting_data_action_toggle_savestates(
|
||||
*
|
||||
* Returns: 0 on success, -1 on error.
|
||||
**/
|
||||
static int setting_data_action_toggle_bind_device(void *data, unsigned action)
|
||||
static int setting_data_action_toggle_bind_device(void *data,
|
||||
unsigned action, bool wraparound)
|
||||
{
|
||||
unsigned *p = NULL;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
@ -651,7 +653,8 @@ static int setting_data_action_toggle_bind_device(void *data, unsigned action)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_data_bool_action_toggle_default(void *data, unsigned action)
|
||||
static int setting_data_bool_action_toggle_default(void *data,
|
||||
unsigned action, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
@ -669,7 +672,8 @@ static int setting_data_bool_action_toggle_default(void *data, unsigned action)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_data_uint_action_toggle_default(void *data, unsigned action)
|
||||
static int setting_data_uint_action_toggle_default(void *data,
|
||||
unsigned action, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
@ -706,7 +710,7 @@ static int setting_data_uint_action_toggle_default(void *data, unsigned action)
|
||||
}
|
||||
|
||||
static int setting_data_fraction_action_toggle_default(
|
||||
void *data, unsigned action)
|
||||
void *data, unsigned action, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
@ -742,7 +746,7 @@ static int setting_data_fraction_action_toggle_default(
|
||||
}
|
||||
|
||||
static int setting_data_string_action_toggle_driver(void *data,
|
||||
unsigned action)
|
||||
unsigned action, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
@ -762,7 +766,7 @@ static int setting_data_string_action_toggle_driver(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int core_list_action_toggle(void *data, unsigned action)
|
||||
static int core_list_action_toggle(void *data, unsigned action, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t *)data;
|
||||
|
||||
@ -790,7 +794,8 @@ static int core_list_action_toggle(void *data, unsigned action)
|
||||
*
|
||||
* Returns: 0 on success, -1 on error.
|
||||
**/
|
||||
static int load_content_action_toggle(void *data, unsigned action)
|
||||
static int load_content_action_toggle(void *data, unsigned action,
|
||||
bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t *)data;
|
||||
|
||||
|
@ -88,7 +88,7 @@ enum setting_list_flags
|
||||
#define SL_FLAG_ALL_SETTINGS (SL_FLAG_ALL - SL_FLAG_MAIN_MENU)
|
||||
|
||||
typedef void (*change_handler_t )(void *data);
|
||||
typedef int (*action_toggle_handler_t )(void *data, unsigned action);
|
||||
typedef int (*action_toggle_handler_t )(void *data, unsigned action, bool wraparound);
|
||||
typedef int (*action_up_or_down_handler_t )(void *data, unsigned action);
|
||||
typedef int (*action_start_handler_t )(void *data);
|
||||
typedef int (*action_iterate_handler_t )(unsigned action);
|
||||
|
Loading…
x
Reference in New Issue
Block a user