From 565a4b359a9f83eb02fbea40fd1a6594bc72c3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 25 Apr 2024 13:42:21 +0200 Subject: [PATCH] [FREELDR] Don't popup about deprecated features in auto-boot scenario (#6803) Addendum to commit 5f3554a40. --- boot/freeldr/freeldr/bootmgr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/boot/freeldr/freeldr/bootmgr.c b/boot/freeldr/freeldr/bootmgr.c index 04d8683a64d..ce977170d5d 100644 --- a/boot/freeldr/freeldr/bootmgr.c +++ b/boot/freeldr/freeldr/bootmgr.c @@ -84,6 +84,10 @@ WarnDeprecated( va_list ap; CHAR msgString[300]; + /* If the user didn't cancel the timeout, don't display the warning */ + if (BootMgrInfo.TimeOut >= 0) + return; + va_start(ap, MsgFmt); RtlStringCbVPrintfA(msgString, sizeof(msgString), MsgFmt, ap); @@ -328,6 +332,9 @@ MainBootMenuKeyPressFilter( IN ULONG SelectedMenuItem, IN PVOID Context OPTIONAL) { + /* Any key-press cancels the global timeout */ + BootMgrInfo.TimeOut = -1; + switch (KeyPress) { case KEY_F8: @@ -445,11 +452,11 @@ VOID RunLoader(VOID) goto Reboot; } - BootMgrInfo.TimeOut = -1; - /* Load the chosen operating system */ LoadOperatingSystem(&OperatingSystemList[SelectedOperatingSystem]); + BootMgrInfo.TimeOut = -1; + /* If we get there, the OS loader failed. As it may have * messed up the display, re-initialize the UI. */ #ifndef _M_ARM