diff --git a/Platform/OpenCanopy/GuiApp.h b/Platform/OpenCanopy/GuiApp.h index ebc43731..872a42ec 100644 --- a/Platform/OpenCanopy/GuiApp.h +++ b/Platform/OpenCanopy/GuiApp.h @@ -113,7 +113,8 @@ BootPickerViewInitialize ( VOID BootPickerViewLateInitialize ( - IN UINT8 DefaultIndex + IN BOOT_PICKER_GUI_CONTEXT *GuiContext, + IN UINT8 DefaultIndex ); EFI_STATUS diff --git a/Platform/OpenCanopy/OcBootstrap.c b/Platform/OpenCanopy/OcBootstrap.c index 208d3f50..b597c6fc 100644 --- a/Platform/OpenCanopy/OcBootstrap.c +++ b/Platform/OpenCanopy/OcBootstrap.c @@ -130,7 +130,10 @@ OcShowMenuByOc ( } } - BootPickerViewLateInitialize ((UINT8) BootContext->DefaultEntry->EntryIndex - 1); + BootPickerViewLateInitialize ( + &mGuiContext, + (UINT8) BootContext->DefaultEntry->EntryIndex - 1 + ); GuiRedrawAndFlushScreen (&mDrawContext); diff --git a/Platform/OpenCanopy/Views/BootPicker.c b/Platform/OpenCanopy/Views/BootPicker.c index daff1594..f765ad5a 100644 --- a/Platform/OpenCanopy/Views/BootPicker.c +++ b/Platform/OpenCanopy/Views/BootPicker.c @@ -1906,13 +1906,16 @@ BootPickerViewInitialize ( VOID BootPickerViewLateInitialize ( - IN UINT8 DefaultIndex + IN BOOT_PICKER_GUI_CONTEXT *GuiContext, + IN UINT8 DefaultIndex ) { UINT32 Index; INT64 ScrollOffset; CONST GUI_VOLUME_ENTRY *BootEntry; + ASSERT (DefaultIndex < mBootPicker.Hdr.Obj.NumChildren); + ScrollOffset = InternelBootPickerScrollSelected (); // // If ScrollOffset is non-0, the selected entry will be aligned left- or @@ -1943,6 +1946,7 @@ BootPickerViewLateInitialize ( mBootPicker.Hdr.Obj.OffsetX += ScrollOffset; InternalBootPickerSelectEntry (&mBootPicker, NULL, DefaultIndex); + GuiContext->BootEntry = InternalGetVolumeEntry (DefaultIndex)->Context; } VOID