From 0f27cb1259f0583ac8212d5a1bb1e6473c48396d Mon Sep 17 00:00:00 2001 From: LiquidFenrir Date: Thu, 7 Dec 2017 16:47:22 +0100 Subject: [PATCH] show warning when too many shuffle items are selected instead of erroring during the install --- source/main.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/main.c b/source/main.c index 6f61fba..fb4b2f2 100644 --- a/source/main.c +++ b/source/main.c @@ -242,17 +242,21 @@ int main(void) switch(current_mode) { case MODE_THEMES: - if(current_list->shuffle_count > 0) + if(current_list->shuffle_count > MAX_SHUFFLE_THEMES) + { + throw_error("You have too many Shuffle seleted.", ERROR_LEVEL_WARNING); + } + else if(current_list->shuffle_count == 0) + { + throw_error("You dont have any Shuffle selected.", ERROR_LEVEL_WARNING); + } + else { draw_install(INSTALL_SHUFFLE); Result res = shuffle_install(*current_list); if(R_FAILED(res)) DEBUG("shuffle install result: %lx\n", res); else current_list->shuffle_count = 0; } - else - { - throw_error("You dont have any Shuffle selected.", ERROR_LEVEL_WARNING); - } break; default: break;