summaryrefslogtreecommitdiff
path: root/src/menu_items.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/menu_items.c')
-rw-r--r--src/menu_items.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/menu_items.c b/src/menu_items.c
index da6df9668..b6142ca37 100644
--- a/src/menu_items.c
+++ b/src/menu_items.c
@@ -3476,8 +3476,11 @@ Gfx* draw_box_fill_wide(Gfx* displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry
gSPDisplayList(displayListHead++, D_02008030);
gDPSetFillColor(displayListHead++, (GPACK_RGBA5551(red, green, (u32) blue, alpha) << 0x10 |
GPACK_RGBA5551(red, green, (u32) blue, alpha)));
- gDPFillWideRectangle(displayListHead++, OTRGetDimensionFromLeftEdge(ulx) - 1, uly, OTRGetDimensionFromRightEdge(lrx) + 1,
- lry);
+ // Use the integer Rect getters: the float getters' negative left edge goes
+ // through a float->unsigned cast in _SHIFTL (UB) that ARM64 saturates to 0,
+ // pushing the fill's left edge to the 4:3 boundary in widescreen.
+ gDPFillWideRectangle(displayListHead++, OTRGetRectDimensionFromLeftEdge(ulx) - 1, uly,
+ OTRGetRectDimensionFromRightEdge(lrx) + 1, lry);
gDPFillRectangle(displayListHead++, ulx, uly, lrx, lry);
gSPDisplayList(displayListHead++, D_02008058);
return displayListHead;