diff options
Diffstat (limited to 'docs/release/src/osd/modules/render/drawd3d.cpp')
-rw-r--r-- | docs/release/src/osd/modules/render/drawd3d.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/docs/release/src/osd/modules/render/drawd3d.cpp b/docs/release/src/osd/modules/render/drawd3d.cpp index 506c93a5d72..c414e0a8226 100644 --- a/docs/release/src/osd/modules/render/drawd3d.cpp +++ b/docs/release/src/osd/modules/render/drawd3d.cpp @@ -8,10 +8,11 @@ // MAME headers #include "emu.h" +#include "emuopts.h" #include "render.h" - #include "rendutil.h" -#include "emuopts.h" +#include "screen.h" + #include "aviio.h" // MAMEOS headers @@ -1523,15 +1524,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 +1626,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; |