diff options
author | 2022-01-22 13:30:35 -0500 | |
---|---|---|
committer | 2022-01-22 13:39:58 -0500 | |
commit | defa0f3262f30b2635baefc0700af646af8dfdc8 (patch) | |
tree | 6d95adba94431a08cb102418bdb99e545abae209 /src/osd/modules/render/drawd3d.cpp | |
parent | 6d2f9e1fda212a54d0b9c4f9615c354e4d5710f2 (diff) |
rendutil.cpp: API cleanup + minor related OSD render cleanups
Diffstat (limited to 'src/osd/modules/render/drawd3d.cpp')
-rw-r--r-- | src/osd/modules/render/drawd3d.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp index 7fc1bcf53d6..cfc494a2be9 100644 --- a/src/osd/modules/render/drawd3d.cpp +++ b/src/osd/modules/render/drawd3d.cpp @@ -1523,15 +1523,10 @@ void renderer_d3d9::batch_vector(const render_primitive &prim) } // compute the effective width based on the direction of the line - float effwidth = prim.width; - if (effwidth < 2.0f) - { - effwidth = 2.0f; - } + float effwidth = std::max(prim.width, 2.0f); // determine the bounds of a quad to draw this line - render_bounds b0, b1; - render_line_to_quad(&prim.bounds, effwidth, effwidth, &b0, &b1); + auto [b0, b1] = render_line_to_quad(prim.bounds, effwidth, effwidth); float lx = b1.x1 - b0.x1; float ly = b1.y1 - b0.y1; @@ -1630,15 +1625,10 @@ void renderer_d3d9::draw_line(const render_primitive &prim) } // compute the effective width based on the direction of the line - float effwidth = prim.width; - if (effwidth < 1.0f) - { - effwidth = 1.0f; - } + float effwidth = std::max(prim.width, 1.0f); // determine the bounds of a quad to draw this line - render_bounds b0, b1; - render_line_to_quad(&prim.bounds, effwidth, 0.0f, &b0, &b1); + auto [b0, b1] = render_line_to_quad(prim.bounds, effwidth, 0.0f); vertex[0].x = b0.x0; vertex[0].y = b0.y0; |