Skip to content

Commit

Permalink
nyx: Fix emummc slider when there's not enough space
Browse files Browse the repository at this point in the history
  • Loading branch information
CTCaer committed May 5, 2020
1 parent bc7c654 commit 3e5ef39
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion nyx/nyx_gui/frontend/gui_tools_partition_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,23 @@ static lv_res_t _action_slider_emu(lv_obj_t *slider)
lv_label_set_text(part_info.lbl_emu, lbl_text);
}
else
lv_slider_set_value(slider, 0);
{
int new_slider_val;
switch (part_info.emu_size)
{
case 29856:
new_slider_val = 1;
break;
case 59712:
new_slider_val = 2;
break;
case 0:
default:
new_slider_val = 0;
break;
}
lv_slider_set_value(slider, new_slider_val);
}

_update_partition_bar();

Expand Down

0 comments on commit 3e5ef39

Please sign in to comment.