Fix issue 539 : Freeze when palette is 'vertical' and number of rows is not a power of two

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2064 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2013-08-30 00:05:47 +00:00
parent 01543b7a8d
commit 365cc8d50b
2 changed files with 13 additions and 3 deletions

View File

@@ -333,7 +333,12 @@ void Button_Pal_right_fast(void)
if ((int)First_color_in_palette+(cells_y)*cells_x*2<256)
First_color_in_palette+=cells_x*cells_y;
else
First_color_in_palette=255/cells_y*cells_y-(cells_x-1)*cells_y;
{
if (Config.Palette_vertical)
First_color_in_palette=255/cells_x*cells_x-(cells_y-1)*cells_x;
else
First_color_in_palette=255/cells_y*cells_y-(cells_x-1)*cells_y;
}
Display_menu_palette();
}
Unselect_button(BUTTON_PAL_RIGHT);