OpenCanopy: Also fix arrow icons to wrap on click
@@ -899,17 +899,17 @@ InternalBootPickerLeftScrollPtrEvent (
// The internal design ensures a selected entry cannot be off-screen,
// scrolling offsets it by at most one spot.
//
- if (mBootPicker.SelectedIndex > 0) {
InternalBootPickerSelectEntry (
&mBootPicker,
DrawContext,
- mBootPicker.SelectedIndex - 1
+ mBootPicker.SelectedIndex > 0
+ ? mBootPicker.SelectedIndex - 1
+ : mBootPicker.Hdr.Obj.NumChildren - 1
);
SelectedEntry = InternalGetVolumeEntry (mBootPicker.SelectedIndex);
ASSERT (!(mBootPicker.Hdr.Obj.OffsetX + SelectedEntry->Hdr.Obj.OffsetX + SelectedEntry->Hdr.Obj.Width > mBootPickerContainer.Obj.Width));
}
- }
//
// Falthrough to 'hit' case.
//
@@ -989,13 +989,13 @@ InternalBootPickerRightScrollPtrEvent (
// The internal design ensures a selected entry cannot be off-screen,
// scrolling offsets it by at most one spot.
//
- if (mBootPicker.SelectedIndex + 1 < mBootPicker.Hdr.Obj.NumChildren) {
InternalBootPickerSelectEntry (
&mBootPicker,
DrawContext,
- mBootPicker.SelectedIndex + 1
+ mBootPicker.SelectedIndex + 1 < mBootPicker.Hdr.Obj.NumChildren
+ ? mBootPicker.SelectedIndex + 1
+ : 0
);
- }
SelectedEntry = InternalGetVolumeEntry (mBootPicker.SelectedIndex);
ASSERT (!(mBootPicker.Hdr.Obj.OffsetX + SelectedEntry->Hdr.Obj.OffsetX < 0));
