Skip to content

Commit

Permalink
OpenCanopy: Also fix arrow icons to wrap on click
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Apr 22, 2021
1 parent c6c1284 commit 5668fb6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Platform/OpenCanopy/Views/BootPicker.c
Expand Up @@ -899,16 +899,16 @@ 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
);
InternalBootPickerSelectEntry (
&mBootPicker,
DrawContext,
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.
Expand Down Expand Up @@ -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
);
}
InternalBootPickerSelectEntry (
&mBootPicker,
DrawContext,
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));
Expand Down

0 comments on commit 5668fb6

Please sign in to comment.