fix shuffle brick (#134)

This commit is contained in:
LiquidFenrir
2018-01-28 02:37:52 +01:00
committed by GitHub
parent f01e347b17
commit 5090da114f
3 changed files with 5 additions and 5 deletions

View File

@@ -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:

View File

@@ -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
{

View File

@@ -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);
}