summaryrefslogtreecommitdiffstats
path: root/docs/release/src/osd/modules/render/drawd3d.cpp
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2022-01-26 08:31:48 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2022-01-26 08:31:48 +1100
commit2ca9fef8e0084fcd60b187c6e0ad56839de1a2c8 (patch)
tree6fa702cbff2eb6c6b4709ed154c0e84109a39404 /docs/release/src/osd/modules/render/drawd3d.cpp
parent3cb823b5d260b95557bb00115f2f763a1ced6f1e (diff)
0.240 filestag240
Diffstat (limited to 'docs/release/src/osd/modules/render/drawd3d.cpp')
-rw-r--r--docs/release/src/osd/modules/render/drawd3d.cpp23
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;