diff options
author | Galen Sagarin <gps5307@rit.edu> | 2025-05-06 15:05:22 -0400 |
---|---|---|
committer | Galen Sagarin <gps5307@rit.edu> | 2025-05-06 15:05:22 -0400 |
commit | e4324f180c31ebf06206be6dff5f3863d6ec2675 (patch) | |
tree | 73f197fe28c8cc9efdb113b9702790d0085caaff /kernel/efi | |
parent | tar.c documentation (diff) | |
parent | start docs (diff) | |
download | comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.tar.gz comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.tar.bz2 comus-e4324f180c31ebf06206be6dff5f3863d6ec2675.zip |
Merge branch 'main' of https://github.com/kenshineto/kern
Should have fixed
Diffstat (limited to '')
-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; |