mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OpenCanopy: Statically construct GOP content to match pointer context
This commit is contained in:
parent
ed1dcd82a2
commit
d339cd2085
@ -48,7 +48,9 @@ GuiOutputConstruct (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
GUI_OUTPUT_CONTEXT *Context;
|
||||
// TODO: alloc on the fly?
|
||||
STATIC GUI_OUTPUT_CONTEXT Context;
|
||||
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;
|
||||
|
||||
Gop = InternalGuiOutputLocateGop();
|
||||
@ -56,13 +58,8 @@ GuiOutputConstruct (
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Context = AllocatePool (sizeof (*Context));
|
||||
if (Context == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Context->Gop = Gop;
|
||||
return Context;
|
||||
Context.Gop = Gop;
|
||||
return &Context;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
@ -108,5 +105,5 @@ GuiOutputDestruct (
|
||||
)
|
||||
{
|
||||
ASSERT (Context != NULL);
|
||||
FreePool (Context);
|
||||
ZeroMem (Context, sizeof (*Context));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user