diff options
author | Freya Murphy <freya@freyacat.org> | 2025-05-06 14:21:26 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-05-06 14:21:26 -0400 |
commit | 0fd92cbb351a7ae652ceb047516ad4f00a85ddb6 (patch) | |
tree | 085aa75ea8c9c3ed83a8968acc066e6d0c4aefdb | |
parent | smooth scrolling for term (diff) | |
download | comus-0fd92cbb351a7ae652ceb047516ad4f00a85ddb6.tar.gz comus-0fd92cbb351a7ae652ceb047516ad4f00a85ddb6.tar.bz2 comus-0fd92cbb351a7ae652ceb047516ad4f00a85ddb6.zip |
set max res for gop framebuffer
-rw-r--r-- | kernel/efi/gop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/efi/gop.c b/kernel/efi/gop.c index 899bbee..5495980 100644 --- a/kernel/efi/gop.c +++ b/kernel/efi/gop.c @@ -4,6 +4,8 @@ static EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = NULL; +#define MAX_H_RES 1920 + EFI_STATUS efi_load_gop(EFI_SYSTEM_TABLE *ST) { EFI_STATUS status = EFI_SUCCESS; @@ -33,6 +35,8 @@ EFI_STATUS efi_load_gop(EFI_SYSTEM_TABLE *ST) if (info->PixelFormat != PixelBlueGreenRedReserved8BitPerColor && info->PixelFormat != PixelRedGreenBlueReserved8BitPerColor) continue; + if (info->HorizontalResolution > MAX_H_RES) + continue; if (info->HorizontalResolution > width) { width = info->HorizontalResolution; best = i; |