haiku_loader.efi: add support for rgb16

Change-Id: I7634b8734d057f99d69c494ea941e1f38f94b757
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8564
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Jérôme Duval
2024-11-15 02:06:28 +00:00
committed by waddlesplash
parent dcbba21430
commit ba8970a3e0
+7 -1
View File
@@ -197,6 +197,12 @@ platform_init_video(void)
&& info->PixelInformation.BlueMask == 0x0000FF
&& info->PixelInformation.ReservedMask == 0) {
depth = 24;
} else if (info->PixelFormat == PixelBitMask
&& info->PixelInformation.RedMask == 0xF800
&& info->PixelInformation.GreenMask == 0x07E0
&& info->PixelInformation.BlueMask == 0x001F
&& info->PixelInformation.ReservedMask == 0) {
depth = 16;
} else {
TRACE((" pixel format: %x unsupported\n",
info->PixelFormat));
@@ -209,7 +215,7 @@ platform_init_video(void)
videoMode->mode = mode;
videoMode->width = info->HorizontalResolution;
videoMode->height = info->VerticalResolution;
videoMode->bits_per_pixel = info->PixelFormat == PixelBitMask ? 24 : 32;
videoMode->bits_per_pixel = depth;
videoMode->bytes_per_row = info->PixelsPerScanLine * depth / 8;
add_video_mode(videoMode);
}