diff --git a/src/core/gpu_sw.cpp b/src/core/gpu_sw.cpp index edf6c69c3..158e80b05 100644 --- a/src/core/gpu_sw.cpp +++ b/src/core/gpu_sw.cpp @@ -811,8 +811,8 @@ void GPU_SW::DispatchRenderCommand() cmd->vertices[i].x = m_drawing_offset.x + vp.x; cmd->vertices[i].y = m_drawing_offset.y + vp.y; - const auto [min_x, max_x] = MinMax(cmd->vertices[i - 1].x, cmd->vertices[i].y); - const auto [min_y, max_y] = MinMax(cmd->vertices[i - 1].x, cmd->vertices[i].y); + const auto [min_x, max_x] = MinMax(cmd->vertices[i - 1].x, cmd->vertices[i].x); + const auto [min_y, max_y] = MinMax(cmd->vertices[i - 1].y, cmd->vertices[i].y); if ((max_x - min_x) >= MAX_PRIMITIVE_WIDTH || (max_y - min_y) >= MAX_PRIMITIVE_HEIGHT) { Log_DebugPrintf("Culling too-large line: %d,%d - %d,%d", cmd->vertices[i - 1].x, cmd->vertices[i - 1].y,