From 61a4960380d69976b3195dd895ef9d459878851d Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 31 Oct 2020 00:59:25 +1000 Subject: [PATCH] GPU: Skip zero-width or height fills --- src/core/gpu_commands.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/gpu_commands.cpp b/src/core/gpu_commands.cpp index 4c5716fa4..4db537e43 100644 --- a/src/core/gpu_commands.cpp +++ b/src/core/gpu_commands.cpp @@ -459,7 +459,9 @@ bool GPU::HandleFillRectangleCommand() Log_DebugPrintf("Fill VRAM rectangle offset=(%u,%u), size=(%u,%u)", dst_x, dst_y, width, height); - FillVRAM(dst_x, dst_y, width, height, color); + if (width > 0 && height > 0) + FillVRAM(dst_x, dst_y, width, height, color); + m_stats.num_vram_fills++; AddCommandTicks(46 + ((width / 8) + 9) * height); EndCommand();