mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-24 21:16:19 +00:00
Support custom backcolor when logo is smaller
When the bootlogo is smaller than 720x1280, the background color will be set to match the color of bmp's 1st pixel. This ends the limit of having to use a background color of 0x1B1B1B.
This commit is contained in:
parent
60905c3829
commit
a5f2bb9d57
@ -1,10 +1,12 @@
|
|||||||
# hekate - Bootlogo
|
# hekate - Bootlogo
|
||||||
|
|
||||||
The bootlogo can be any size with a maximum of 720 x 1280. It is automatically centered when it's smaller than 720 x 1280.
|
The bootlogo can be any size with a maximum of 720 x 1280.
|
||||||
|
|
||||||
When saving a landscape bootlogo, it should be rotated 90o counterclockwise.
|
When it's smaller than 720 x 1280, it is automatically centered and the background takes the color of the first pixel.
|
||||||
|
|
||||||
Lastly, the supported format is 32-bit BMP. Classic 24-bit BMPs are not supported for performance reasons.
|
When saving a landscape bootlogo, it should be rotated 90 degrees counterclockwise.
|
||||||
|
|
||||||
|
Lastly, the supported format is 32-bit (ARGB) BMP. Classic 24-bit (RGB) BMPs are not supported for performance reasons.
|
||||||
|
|
||||||
|
|
||||||
## How to configure
|
## How to configure
|
||||||
|
@ -1816,6 +1816,9 @@ void auto_launch_firmware()
|
|||||||
// Center logo if res < 720x1280.
|
// Center logo if res < 720x1280.
|
||||||
bmpData.pos_x = (720 - bmpData.size_x) >> 1;
|
bmpData.pos_x = (720 - bmpData.size_x) >> 1;
|
||||||
bmpData.pos_y = (1280 - bmpData.size_y) >> 1;
|
bmpData.pos_y = (1280 - bmpData.size_y) >> 1;
|
||||||
|
// Get background color from 1st pixel.
|
||||||
|
if (bmpData.size_x < 720 || bmpData.size_y < 1280)
|
||||||
|
gfx_clear_color(&gfx_ctxt, *(u32 *)BOOTLOGO);
|
||||||
|
|
||||||
bootlogoFound = 1;
|
bootlogoFound = 1;
|
||||||
}
|
}
|
||||||
@ -1865,6 +1868,7 @@ void auto_launch_firmware()
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:;
|
out:;
|
||||||
|
gfx_clear_grey(&gfx_ctxt, 0x1B);
|
||||||
if (!ini_freed)
|
if (!ini_freed)
|
||||||
ini_free(&ini_sections);
|
ini_free(&ini_sections);
|
||||||
ini_free_section(cfg_sec);
|
ini_free_section(cfg_sec);
|
||||||
@ -2502,7 +2506,6 @@ void ipl_main()
|
|||||||
//display_color_screen(0xAABBCCDD);
|
//display_color_screen(0xAABBCCDD);
|
||||||
u32 *fb = display_init_framebuffer();
|
u32 *fb = display_init_framebuffer();
|
||||||
gfx_init_ctxt(&gfx_ctxt, fb, 720, 1280, 768);
|
gfx_init_ctxt(&gfx_ctxt, fb, 720, 1280, 768);
|
||||||
gfx_clear_grey(&gfx_ctxt, 0x1B);
|
|
||||||
|
|
||||||
#ifdef MENU_LOGO_ENABLE
|
#ifdef MENU_LOGO_ENABLE
|
||||||
Kc_MENU_LOGO = (u8 *)malloc(0x6000);
|
Kc_MENU_LOGO = (u8 *)malloc(0x6000);
|
||||||
|
Loading…
Reference in New Issue
Block a user