Several fixes to ieee1275 and big-endian video.
This commit is contained in:
parent
813c16222f
commit
a8905e8ae8
18 changed files with 655 additions and 72 deletions
|
@ -151,8 +151,7 @@ grub_video_sdl_setup (unsigned int width, unsigned int height,
|
|||
return err;
|
||||
|
||||
/* Copy default palette to initialize emulated palette. */
|
||||
grub_video_sdl_set_palette (0, (sizeof (grub_video_fbstd_colors)
|
||||
/ sizeof (grub_video_fbstd_colors[0])),
|
||||
grub_video_sdl_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
|
||||
grub_video_fbstd_colors);
|
||||
|
||||
/* Reset render target to SDL one. */
|
||||
|
@ -166,7 +165,14 @@ grub_video_sdl_set_palette (unsigned int start, unsigned int count,
|
|||
unsigned i;
|
||||
if (window->format->palette)
|
||||
{
|
||||
SDL_Color *tmp = grub_malloc (count * sizeof (tmp[0]));
|
||||
SDL_Color *tmp;
|
||||
if (start >= mode_info.number_of_colors)
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
if (start + count > mode_info.number_of_colors)
|
||||
count = mode_info.number_of_colors - start;
|
||||
|
||||
tmp = grub_malloc (count * sizeof (tmp[0]));
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
tmp[i].r = palette_data[i].r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue