From 5090da114f61d62ff9fcabeea37d8ce66c095fcc Mon Sep 17 00:00:00 2001 From: LiquidFenrir Date: Sun, 28 Jan 2018 02:37:52 +0100 Subject: [PATCH] fix shuffle brick (#134) --- source/draw.c | 2 +- source/main.c | 4 ++-- source/themes.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/draw.c b/source/draw.c index ef85393..6f3d5b2 100644 --- a/source/draw.c +++ b/source/draw.c @@ -313,7 +313,7 @@ void draw_interface(Entry_List_s* list, Instructions_s instructions) switch(current_mode) { case MODE_THEMES: - pp2d_draw_textf(7, 3, 0.6, 0.6, list->shuffle_count <= 10 ? COLOR_WHITE : COLOR_RED, "Shuffle: %i/10", list->shuffle_count); + pp2d_draw_textf(7, 3, 0.6, 0.6, list->shuffle_count <= 10 && list->shuffle_count >= 2 ? COLOR_WHITE : COLOR_RED, "Shuffle: %i/10", list->shuffle_count); pp2d_draw_texture_blend(TEXTURE_SHUFFLE, 320-120, 0, COLOR_WHITE); break; default: diff --git a/source/main.c b/source/main.c index 6d0e649..ac354c6 100644 --- a/source/main.c +++ b/source/main.c @@ -463,9 +463,9 @@ int main(void) { throw_error("You have too many themes selected.", ERROR_LEVEL_WARNING); } - else if(current_list->shuffle_count == 0) + else if(current_list->shuffle_count < 2) { - throw_error("You don't have any themes selected.", ERROR_LEVEL_WARNING); + throw_error("You don't have enough themes selected.", ERROR_LEVEL_WARNING); } else { diff --git a/source/themes.c b/source/themes.c index ce216c3..6857bbf 100644 --- a/source/themes.c +++ b/source/themes.c @@ -44,9 +44,9 @@ static Result install_theme_internal(Entry_List_s themes, int installmode) if(installmode & THEME_INSTALL_SHUFFLE) { - if(themes.shuffle_count == 0) + if(themes.shuffle_count < 2) { - DEBUG("no themes selected for shuffle\n"); + DEBUG("not enough themes selected for shuffle\n"); return MAKERESULT(RL_USAGE, RS_INVALIDARG, RM_COMMON, RD_INVALID_SELECTION); }