mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OpenCanopy: Require minimum cursor size
This commit is contained in:
parent
cfa3c74313
commit
823fceeebd
@ -445,6 +445,19 @@ InternalContextConstruct (
|
||||
ICON_GENERIC_HDD < ICON_NUM_MANDATORY,
|
||||
"The base icon should must be cleaned up explicitly."
|
||||
);
|
||||
} else if (Index == ICON_CURSOR) {
|
||||
if (Context->Icons[ICON_CURSOR][ICON_TYPE_BASE].Width < MIN_CURSOR_DIMENSION * Context->Scale
|
||||
|| Context->Icons[ICON_CURSOR][ICON_TYPE_BASE].Height < MIN_CURSOR_DIMENSION * Context->Scale) {
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"OCUI: Expected at least %dx%d for cursor, actual %dx%d\n",
|
||||
MIN_CURSOR_DIMENSION * Context->Scale,
|
||||
MIN_CURSOR_DIMENSION * Context->Scale,
|
||||
Context->Icons[ICON_CURSOR][ICON_TYPE_BASE].Width,
|
||||
Context->Icons[ICON_CURSOR][ICON_TYPE_BASE].Height
|
||||
));
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ZeroMem (&Context->Icons[Index], sizeof (Context->Icons[Index]));
|
||||
|
||||
@ -13,10 +13,11 @@
|
||||
|
||||
#include <Library/OcBootManagementLib.h>
|
||||
|
||||
#define MAX_CURSOR_DIMENSION 144U
|
||||
|
||||
#define BOOT_CURSOR_OFFSET 4U
|
||||
|
||||
#define MAX_CURSOR_DIMENSION 144U
|
||||
#define MIN_CURSOR_DIMENSION BOOT_CURSOR_OFFSET
|
||||
|
||||
#define BOOT_ENTRY_DIMENSION 144U
|
||||
#define BOOT_ENTRY_ICON_DIMENSION APPLE_DISK_ICON_DIMENSION
|
||||
#define BOOT_ENTRY_ICON_SPACE ((BOOT_ENTRY_DIMENSION - BOOT_ENTRY_ICON_DIMENSION) / 2)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user