mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
Action OK toggles boolean setting now too
This commit is contained in:
parent
4941cd7dbd
commit
ead20f9ba5
@ -1207,6 +1207,8 @@ unsigned menu_input_frame_retropad(retro_input_t input, retro_input_t trigger_in
|
||||
| (1UL << RETRO_DEVICE_ID_JOYPAD_DOWN)
|
||||
| (1UL << RETRO_DEVICE_ID_JOYPAD_LEFT)
|
||||
| (1UL << RETRO_DEVICE_ID_JOYPAD_RIGHT)
|
||||
| (1UL << RETRO_DEVICE_ID_JOYPAD_B)
|
||||
| (1UL << RETRO_DEVICE_ID_JOYPAD_A)
|
||||
| (1UL << RETRO_DEVICE_ID_JOYPAD_L)
|
||||
| (1UL << RETRO_DEVICE_ID_JOYPAD_R);
|
||||
bool set_scroll = false;
|
||||
|
@ -1229,6 +1229,19 @@ static int setting_generic_action_start_default(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_bool_action_ok_default(void *data, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
menu_setting_set_with_string_representation(setting,
|
||||
*setting->value.boolean ? "false" : "true");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_bool_action_toggle_default(void *data, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
@ -1405,7 +1418,7 @@ static rarch_setting_t setting_bool_setting(const char* name,
|
||||
result.action_start = setting_generic_action_start_default;
|
||||
result.action_left = setting_bool_action_toggle_default;
|
||||
result.action_right = setting_bool_action_toggle_default;
|
||||
result.action_ok = setting_generic_action_ok_default;
|
||||
result.action_ok = setting_bool_action_ok_default;
|
||||
result.action_select = setting_generic_action_ok_default;
|
||||
result.action_cancel = NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user