diff --git a/Platform/OpenCanopy/OpenCanopy.c b/Platform/OpenCanopy/OpenCanopy.c index af693cda..27bb1221 100644 --- a/Platform/OpenCanopy/OpenCanopy.c +++ b/Platform/OpenCanopy/OpenCanopy.c @@ -639,27 +639,27 @@ GuiOverlayPointer ( // BaseX = (INT64) PointerPos.Pos.X - BOOT_CURSOR_OFFSET * DrawContext->Scale; + MaxWidth = DrawContext->Screen.Width; if (BaseX < 0) { ImageOffsetX = (UINT32) -BaseX; DrawBaseX = 0; } else { ImageOffsetX = 0; DrawBaseX = (UINT32) BaseX; + MaxWidth -= DrawBaseX; } - MaxWidth = MIN (CursorImage->Width, (UINT32) (DrawContext->Screen.Width - BaseX)); - BaseY = (INT64) PointerPos.Pos.Y - BOOT_CURSOR_OFFSET * DrawContext->Scale; + MaxHeight = DrawContext->Screen.Height; if (BaseY < 0) { ImageOffsetY = (UINT32) -BaseY; DrawBaseY = 0; } else { ImageOffsetY = 0; DrawBaseY = (UINT32) BaseY; + MaxHeight -= DrawBaseY; } - MaxHeight = MIN (CursorImage->Height, (UINT32) (DrawContext->Screen.Height - BaseY)); - GuiDrawToBuffer ( CursorImage, DrawContext->CursorOpacity,