(Video) Add dropdow list for Video -> Rotation

(Dropdown list) Fix off-by-one entry - last entry was not being
displayed
This commit is contained in:
twinaphex 2018-09-23 11:05:07 +02:00
parent f00f73c5ed
commit e9516827b9
2 changed files with 3 additions and 2 deletions

View File

@ -7710,7 +7710,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
if (setting->get_string_representation)
{
unsigned orig_value = *setting->value.target.unsigned_integer;
for (i = 0.00; i < max; i += step)
for (i = 0.00; i <= max; i += step)
{
char val_s[256], val_d[256];
int val = (int)i;
@ -7735,7 +7735,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
}
else
{
for (i = 1.00; i < max; i += step)
for (i = 1.00; i <= max; i += step)
{
char val_s[16], val_d[16];
int val = (int)i;

View File

@ -4339,6 +4339,7 @@ static bool setting_append_list(
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_video_rotation;
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);