diff --git a/sysmodules/rosalina/source/draw.c b/sysmodules/rosalina/source/draw.c index 4cb2411b..c02e850f 100644 --- a/sysmodules/rosalina/source/draw.c +++ b/sysmodules/rosalina/source/draw.c @@ -265,10 +265,11 @@ void Draw_ConvertFrameBufferLine(u8 *line, bool top, bool left, u32 y) GSPGPU_FramebufferFormats fmt = top ? (GSPGPU_FramebufferFormats)(GPU_FB_TOP_FMT & 7) : (GSPGPU_FramebufferFormats)(GPU_FB_BOTTOM_FMT & 7); u32 width = top ? 400 : 320; u8 formatSizes[] = { 4, 3, 2, 2, 2 }; + u32 stride = top ? GPU_FB_TOP_STRIDE : GPU_FB_BOTTOM_STRIDE; u32 pa = Draw_GetCurrentFramebufferAddress(top, left); u8 *addr = (u8 *)PA_PTR(pa); for(u32 x = 0; x < width; x++) - Draw_ConvertPixelToBGR8(line + x * 3 , addr + (x * 240 + y) * formatSizes[(u8)fmt], fmt); + Draw_ConvertPixelToBGR8(line + x * 3 , addr + x * stride + y * formatSizes[(u8)fmt], fmt); }