]> code.delx.au - refind/blobdiff - refind/menu.c
Add warning to refind-install when --alldrivers is used without
[refind] / refind / menu.c
index 35a8f26cdcb18c3cf75ae606831a4651ef56b4b4..4fa93b15d576b6ec8ebf94f7ea16cf999db3d995 100644 (file)
@@ -970,17 +970,15 @@ static VOID DrawMainMenuEntry(REFIT_MENU_ENTRY *Entry, BOOLEAN selected, UINTN X
 {
    EG_IMAGE *Background;
 
-   if (SelectionImages != NULL) {
-      if (selected) {
-         Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos,
+   if (selected) {
+      Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos,
+                               SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
+      egComposeImage(Background, SelectionImages[Entry->Row], 0, 0);
+      BltImageCompositeBadge(Background, Entry->Image, Entry->BadgeImage, XPos, YPos);
+   } else { // Image not selected; copy background
+      egDrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos,
                                   SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
-         egComposeImage(Background, SelectionImages[Entry->Row], 0, 0);
-         BltImageCompositeBadge(Background, Entry->Image, Entry->BadgeImage, XPos, YPos);
-      } else { // Image not selected; copy background
-         egDrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos,
-                                     SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
-      } // if/else
-   } // if
+   } // if/else
 } // VOID DrawMainMenuEntry()
 
 static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN *itemPosX,