From: srs5694
Date: Mon, 7 May 2012 02:55:37 +0000 (-0400)
Subject: A few tweaks to make it a 0.3.3 release
X-Git-Url: https://code.delx.au/refind/commitdiff_plain/0e0eab46ae75565917f99a93f28589a351c000b7
A few tweaks to make it a 0.3.3 release
---
diff --git a/NEWS.txt b/NEWS.txt
index 4a91f8c..a8fed26 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,4 +1,4 @@
-0.3.3 (?/?/2012):
+0.3.3 (5/6/2012):
-----------------
- Improved menu navigation:
@@ -9,9 +9,9 @@
the edge of the row. In text mode, the "rows" are broken down as in
graphics mode, but they aren't visibly distinguished on the screen.
-- Improved text-mode use: Now displays the proper number of entries when
- first started and scrolling is done sensibly when too many entries exist
- to fit on the screen.
+- Improved text-mode use: rEFInd now displays the proper number of entries
+ when first started in text mode and scrolling is done sensibly when too
+ many entries exist to fit on the screen.
0.3.2 (5/4/2012):
-----------------
diff --git a/docs/refind/bootmode.html b/docs/refind/bootmode.html
index b2acedb..165d0c3 100644
--- a/docs/refind/bootmode.html
+++ b/docs/refind/bootmode.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html
index 56c3813..3e145bb 100644
--- a/docs/refind/configfile.html
+++ b/docs/refind/configfile.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html
index 0e25044..22a8fe0 100644
--- a/docs/refind/drivers.html
+++ b/docs/refind/drivers.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 4/19/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/features.html b/docs/refind/features.html
index 9c45522..e47ae1d 100644
--- a/docs/refind/features.html
+++ b/docs/refind/features.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/getting.html b/docs/refind/getting.html
index 9914588..2dc86fb 100644
--- a/docs/refind/getting.html
+++ b/docs/refind/getting.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -97,7 +97,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
-- A
+
- A
source code zip file—This is useful if you want to
compile the software locally. Note that I use Linux with the GNU-EFI development
@@ -106,7 +106,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
it.
- A
+ href="http://sourceforge.net/projects/refind/files/0.3.3/refind-bin-0.3.3.zip/download">A
binary zip file—Download this if you want to install
rEFInd on an x86 or x86-64 computer and have no need to
test rEFInd first by booting it on an optical disc. This zip file
@@ -116,7 +116,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
href="installing.html">Installing rEFInd page.
- A
+ href="http://sourceforge.net/projects/refind/files/0.3.3/refind-cd-0.3.3.zip/download">A
CD-R image file—This download contains the same files as
the zip file, but you can burn it to a CD-R to test rEFInd without
installing it first. (It boots on UEFI PCs, but fails on some older
diff --git a/docs/refind/index.html b/docs/refind/index.html
index 5fc4abd..a008290 100644
--- a/docs/refind/index.html
+++ b/docs/refind/index.html
@@ -14,7 +14,8 @@
by Roderick W. Smith, rodsmith@rodsbooks.com
- Originally written: 3/14/2012; last Web page update: 5/4/2012, referencing rEFInd 0.3.2
+Originally written: 3/14/2012; last Web page update:
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/installing.html b/docs/refind/installing.html
index b6bce26..ab9c120 100644
--- a/docs/refind/installing.html
+++ b/docs/refind/installing.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/linux.html b/docs/refind/linux.html
index fec78d4..e6dbcbf 100644
--- a/docs/refind/linux.html
+++ b/docs/refind/linux.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/19/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/revisions.html b/docs/refind/revisions.html
index 3b51448..1ea8d93 100644
--- a/docs/refind/revisions.html
+++ b/docs/refind/revisions.html
@@ -14,7 +14,7 @@
by Roderick W. Smith, rodsmith@rodsbooks.com
-Last Web page update: 5/4/2012
+Last Web page update: 5/6/2012
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -93,6 +93,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
+- 0.3.3 (5/6/2012)—I've focused on user interface improvements for this release. The biggest improvement is in the text-mode interface, which suffered from assorted display glitches in previous releases. These have now been fixed, so the text-mode interface should be more usable. I've also fine-tuned the use of keyboard keys, particularly in graphical mode. The up and down arrow keys now move between the two rows of the display, and Page Up and Page Down scroll the first row if it's too big for the display. (They'll also move between rows, but only when at the end of the first row or the start of the second.) Returning from a failed loader or a tool or built-in function now renders that tag as the currently-selected item, rather than setting the default loader as active, as happened with previous versions.
+
- 0.3.2 (5/4/2012)—rEFInd's core functionality changes very little with this version; I've tweaked the detection of BIOS-mode boot loaders to keep unbootable FAT partitions created under Linux and Windows out of the boot list, while adding detection of GRUB BIOS Boot Partitions to the list. I've also made a change that improves screen-clearing when launching EFI utilities and OSes in text mode. The major change to this version is the addition of a new Linux/OS X installation script, install.sh. In most cases, this makes it possible to install rEFInd simply by typing ./install.sh from the rEFInd package directory; however, you should see the Installing rEFInd page for details. In some cases, manual installation may still be required. Also, you may prefer to copy over the old rEFInd program file with the new one when upgrading.
- 0.3.1 (4/27/2012)—You'll find a few minor enhancements and bug fixes in this version, none of which affect the configuration files. rEFInd now sorts its boot loader entries within each directory by date, with the newest items first. The intent is that you can specify a directory name as the default_selection and the most recent boot loader in that directory will become the default. This may obviate the need to adjust the default after adding a new Linux kernel with EFI stub loader support. I've also improved the handling of .icns files for Linux kernels that lack .efi extensions; loader-specific icons for these kernels should now take the name of the kernel plus .icns—for instance, vmlinuz-0.3.2.icns for vmlinuz-0.3.2. rEFInd also now hides all .icns files from the boot loader list. Finally, this version fixes a bug, introduced in version 0.3.0, that could cause spurious Unsupported while scanning the root directory errors under some conditions on Macs.
diff --git a/docs/refind/themes.html b/docs/refind/themes.html
index a39fec4..66c60dc 100644
--- a/docs/refind/themes.html
+++ b/docs/refind/themes.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 4/19/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
diff --git a/docs/refind/todo.html b/docs/refind/todo.html
index fbf250c..b482f26 100644
--- a/docs/refind/todo.html
+++ b/docs/refind/todo.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -187,11 +187,6 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
whole-disk encryption scheme that's new with OS X 10.7. Unfortunately,
I lack the hardware to test this.
-- The Page Up and Page Down keys work in a rather strange way—a
- result of an admittedly quick fix on my part to a problem with a data
- structure that makes implementation of scrolling harder than it ought
- to be.
-
- The Shutdown option works correctly on Macs, but not on UEFI-based PCs.
On such systems, Shutdown reboots the computer. This should be
fixed.
diff --git a/docs/refind/using.html b/docs/refind/using.html
index 64836a3..1e0ccfc 100644
--- a/docs/refind/using.html
+++ b/docs/refind/using.html
@@ -15,7 +15,7 @@
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Originally written: 3/14/2012; last Web page update:
-5/4/2012, referencing rEFInd 0.3.2
+5/6/2012, referencing rEFInd 0.3.3
I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
@@ -102,9 +102,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
If you don't press any key before the timeout (shown on the last line) expires, the default boot loader will launch. This is normally the first item in the menu, but you can adjust the default by editing the configuration file. (In this example, it's the SUSE loader, which is further identified by text above the timeout as Linux 3.3.0-rc7 from ESP.)
-This display is dominated by the central set of icons, which in this example includes icons for OS X, Windows, Ubuntu, a generic Linux installation (ELILO, in fact), SUSE, and an unkown boot loader. All but the last of these are on hard disks, but the unknown boot loader is on an optical disc, as revealed by the small icons (known as badges) in the lower-right corner of the OS icons.
+This display is dominated by the central set of OS tags (icons), which in this example includes icons for OS X, Windows, Ubuntu, a generic Linux installation (ELILO, in fact), SUSE, and an unkown boot loader. All but the last of these are on hard disks, but the unknown boot loader is on an optical disc, as revealed by the small icons (known as badges) in the lower-right corner of the OS icons.
-In this example, the SUSE tag is selected. You can move the selection left by pressing the left or down arrow key and right by pressing the right or up arrow key. If your system has many boot loaders, an arrow icon will appear to the right of the boot loader list, indicating that the boot loader list will scroll when you move off the right edge. If you do this, an arrow icon will appear to the left of the icon list, indicating that you can scroll back in a similar manner. Moving past the final selection or using the Page Down key moves the selection to the second row of small icons, which launch ancillary programs or perform special actions. In this figure, these five icons are present:
+In this example, the SUSE tag is selected. You can move the selection left by pressing the left arrow key and right by pressing the right arrow key. If your system has many boot loaders, an arrow icon will appear to the right of the boot loader list, indicating that the boot loader list will scroll when you move off the right edge. If you do this, an arrow icon will appear to the left of the icon list, indicating that you can scroll back in a similar manner. You can scroll the list by one line full of icons by using the Page Up or Page Down keys to move left and right, respectively. Moving past the final selection or using the down arrow key moves the selection to the second row of small icons, which launch ancillary programs or perform special actions. If you've moved the selection cursor to the second row, pressing the up arrow key or scrolling past the left edge of the second row moves the cursor to the top row. In this figure, these five icons are present:
@@ -141,19 +141,35 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Explanation |
- left arrow or up arrow |
+ left arrow |
Moves the selection one icon to the left (or up the list in text mode) |
- right arrow or down arrow |
+ right arrow |
Moves the selection one icon to the right (or down the list in text mode) |
- Page Up or Home |
+ up arrow |
+ Moves the selection from the utilities row to the OS row (in text mode, moves up one entry) |
+
+
+ down arrow |
+ Moves the selection from the OS row to the utilities row (in text mode, moves down one entry) |
+
+
+ Page Up |
+ Scrolls the visible set of tags to the left (or up in text mode) |
+
+
+ Page Down |
+ Scrolls the visible set of tags to the right (or down in text mode) |
+
+
+ Home |
Moves the selection to the first item on the OS row |
- Page Down or End |
+ End |
Moves the selection to the last item on the utilities row |
@@ -172,30 +188,38 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
Enter or spacebar |
Launches the currently-selected OS, utility, or built-in feature |
-
- 0 |
- Launches the Linux rescue entry |
-
1 through 9 |
Launches the specified boot loader by number |
+
+ A |
+ Displays the "About rEFInd" information |
+
E |
- Launches the EFI shell |
+ Launches the first instance of ELILO in the boot list |
+
+
+ G |
+ Launches the first instance of GRUB in the boot list |
L |
- Launches the first Linux ELILO boot loader |
+ Launches the first Linux kernel in the boot list |
M |
- Launches the first Mac OS boot loader |
+ Launches the first Mac OS boot loader in the boot list |
P |
Launches gptsync |
+
+ S |
+ Launches an EFI shell, if available |
+
U |
Shuts down the computer (but note that this is buggy and reboots most UEFI-based PCs) |
@@ -210,7 +234,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
-rEFInd assigns shortcut letters to most OS entries based on the first letter of the directory in which the OS's boot loader is stored. For instance, if you have a boot loader called /EFI/debian/elilo.efi, rEFInd attempts to assign it a shortcut letter of D. rEFInd overrides this default for Mac OS X, Windows, and for Linux ELILO boot loaders if the distribution can't be more precisely identified, as noted in the preceding table. This method works well for many installations, but it can produce conflicts. For instance, if you have a Macintosh that holds both Mac OS X and Mandriva, both OSes would normally use the M shortcut key. In practice, which works depends on the order in which rEFInd detects the OSes.
+rEFInd assigns shortcut letters to most OS entries based on the first letter of the directory in which the OS's boot loader is stored. For instance, if you have a boot loader called /EFI/debian/elilo.efi, rEFInd attempts to assign it a shortcut letter of D. rEFInd overrides this default for Mac OS X, Windows, and for Linux's GRUB, ELILO, and EFI stub boot loaders if the distribution can't be more precisely identified, as noted in the preceding table. This method works well for many installations, but it can produce conflicts. For instance, if you have a Macintosh that holds both Mac OS X and Mandriva, both OSes would normally use the M shortcut key. In practice, which works depends on the order in which rEFInd detects the OSes.
diff --git a/refind/main.c b/refind/main.c
index 3fd7df7..b531905 100644
--- a/refind/main.c
+++ b/refind/main.c
@@ -104,7 +104,7 @@ static VOID AboutrEFInd(VOID)
{
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.2.2");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.3");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -604,6 +604,9 @@ VOID SetLoaderDefaults(LOADER_ENTRY *Entry, CHAR16 *LoaderPath, IN REFIT_VOLUME
Entry->OSType = 'E';
if (ShortcutLetter == 0)
ShortcutLetter = 'L';
+ } else if (StriSubCmp(L"grub", FileName)) {
+ Entry->OSType = 'G';
+ ShortcutLetter = 'G';
} else if (StriCmp(FileName, L"cdboot.efi") == 0 ||
StriCmp(FileName, L"bootmgr.efi") == 0 ||
StriCmp(FileName, L"Bootmgfw.efi") == 0) {
@@ -635,7 +638,6 @@ LOADER_ENTRY * AddLoaderEntry(IN CHAR16 *LoaderPath, IN CHAR16 *LoaderTitle, IN
Entry = InitializeLoaderEntry(NULL);
if (Entry != NULL) {
Entry->Title = StrDuplicate((LoaderTitle != NULL) ? LoaderTitle : LoaderPath);
-// Entry->Title = StrDuplicate(LoaderTitle);
Entry->me.Title = PoolPrint(L"Boot %s from %s", (LoaderTitle != NULL) ? LoaderTitle : LoaderPath, Volume->VolName);
Entry->me.Row = 0;
Entry->me.BadgeImage = Volume->VolBadgeImage;
@@ -1407,7 +1409,7 @@ static VOID ScanForTools(VOID) {
j = 0;
while ((FileName = FindCommaDelimited(SHELL_NAMES, j++)) != NULL) {
if (FileExists(SelfRootDir, FileName)) {
- AddToolEntry(FileName, L"EFI Shell", BuiltinIcon(BUILTIN_ICON_TOOL_SHELL), 'E', FALSE);
+ AddToolEntry(FileName, L"EFI Shell", BuiltinIcon(BUILTIN_ICON_TOOL_SHELL), 'S', FALSE);
}
} // while
break;
@@ -1437,6 +1439,7 @@ efi_main (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
BOOLEAN MainLoopRunning = TRUE;
REFIT_MENU_ENTRY *ChosenEntry;
UINTN MenuExit;
+ CHAR16 *Selection;
// bootstrap
InitializeLib(ImageHandle, SystemTable);
@@ -1459,8 +1462,9 @@ efi_main (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
ScanForBootloaders();
ScanForTools();
+ Selection = StrDuplicate(GlobalConfig.DefaultSelection);
while (MainLoopRunning) {
- MenuExit = RunMainMenu(&MainMenu, GlobalConfig.DefaultSelection, &ChosenEntry);
+ MenuExit = RunMainMenu(&MainMenu, Selection, &ChosenEntry);
// We don't allow exiting the main menu with the Escape key.
if (MenuExit == MENU_EXIT_ESCAPE) {
@@ -1508,8 +1512,10 @@ efi_main (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
return EFI_SUCCESS;
break;
- }
- }
+ } // switch()
+ FreePool(Selection);
+ Selection = StrDuplicate(ChosenEntry->Title);
+ } // while()
// If we end up here, things have gone wrong. Try to reboot, and if that
// fails, go into an endless loop.
diff --git a/refind/menu.c b/refind/menu.c
index 3ff16b1..2b63d05 100644
--- a/refind/menu.c
+++ b/refind/menu.c
@@ -754,16 +754,12 @@ static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN
AdjustScrollState(State);
for (i = State->FirstVisible; i <= State->MaxIndex; i++) {
if (Screen->Entries[i]->Row == 0) {
- State->FinalRow0 = i;
if (i <= State->LastVisible) {
DrawMainMenuEntry(Screen->Entries[i], (i == State->CurrentSelection) ? TRUE : FALSE,
itemPosX[i - State->FirstVisible], row0PosY);
} // if
} else {
- if (State->InitialRow1 > i)
- State->InitialRow1 = i;
- DrawMainMenuEntry(Screen->Entries[i], (i == State->CurrentSelection) ? TRUE : FALSE,
- itemPosX[i], row1PosY);
+ DrawMainMenuEntry(Screen->Entries[i], (i == State->CurrentSelection) ? TRUE : FALSE, itemPosX[i], row1PosY);
}
}
if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_LABEL))
@@ -774,10 +770,17 @@ static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN
// Move the selection to State->CurrentSelection, adjusting icon row if necessary...
static VOID PaintSelection(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN *itemPosX,
UINTN row0PosY, UINTN row1PosY, UINTN textPosY) {
+ UINTN XSelect, YPos;
+
if ((State->CurrentSelection < State->LastVisible) && (State->CurrentSelection >= State->FirstVisible)) {
- DrawMainMenuEntry(Screen->Entries[State->PreviousSelection], FALSE,
- itemPosX[State->PreviousSelection - State->FirstVisible],
- (Screen->Entries[State->PreviousSelection]->Row == 0) ? row0PosY : row1PosY);
+ if (Screen->Entries[State->PreviousSelection]->Row == 0) {
+ XSelect = State->PreviousSelection - State->FirstVisible;
+ YPos = row0PosY;
+ } else {
+ XSelect = State->PreviousSelection;
+ YPos = row1PosY;
+ } // if/else
+ DrawMainMenuEntry(Screen->Entries[State->PreviousSelection], FALSE, itemPosX[XSelect], YPos);
DrawMainMenuEntry(Screen->Entries[State->CurrentSelection], TRUE,
itemPosX[State->CurrentSelection - State->FirstVisible],
(Screen->Entries[State->CurrentSelection]->Row == 0) ? row0PosY : row1PosY);