mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 15:28:58 +01:00
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 <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
dcbba21430
commit
ba8970a3e0
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user