From ba8970a3e0776612795d85ce61d4e67b5b44de4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 14 Nov 2024 17:06:24 +0100 Subject: [PATCH] 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 Reviewed-by: Adrien Destugues --- src/system/boot/platform/efi/video.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/system/boot/platform/efi/video.cpp b/src/system/boot/platform/efi/video.cpp index 9e0b012e11..969e77f693 100644 --- a/src/system/boot/platform/efi/video.cpp +++ b/src/system/boot/platform/efi/video.cpp @@ -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); }