summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/drawd3d.c
diff options
context:
space:
mode:
author Scott Stone <tafoid@users.noreply.github.com>2014-01-24 00:30:29 +0000
committer Scott Stone <tafoid@users.noreply.github.com>2014-01-24 00:30:29 +0000
commitaa896515a041551e9025db1f8d71183d81a5de94 (patch)
tree7fb78379f0dd38aa4f26f44be53b9147aa6e4022 /src/osd/windows/drawd3d.c
parent738e0aeedda637080678510ca262bed2dbae2b41 (diff)
This revert (r26927), as requested by author, fixes the regression of missing graphics for vector games using HLSL. Also reverted patch in code (r27063) to deal with "roundf" for pre-vs2013 compilers - which is no longer needed. (nw)
Diffstat (limited to 'src/osd/windows/drawd3d.c')
-rw-r--r--src/osd/windows/drawd3d.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index f260b3f0758..4d40c31f587 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -44,18 +44,6 @@
#include "drawd3d.h"
-// Visual Studio 2013 is the first version that supports roundf
-#if defined(_MSC_VER) && (_MSC_VER < 1800)
-
-float roundf(float f)
-{
- if (f < 0)
- return ceil(f - 0.5);
-
- return floor(f + 0.5);
-}
-
-#endif
//============================================================
// DEBUGGING
@@ -1702,14 +1690,14 @@ void renderer::draw_quad(const render_primitive *prim)
return;
// fill in the vertexes clockwise
- vertex[0].x = roundf(prim->bounds.x0) - 0.5f;
- vertex[0].y = roundf(prim->bounds.y0) - 0.5f;
- vertex[1].x = roundf(prim->bounds.x1) - 0.5f;
- vertex[1].y = roundf(prim->bounds.y0) - 0.5f;
- vertex[2].x = roundf(prim->bounds.x0) - 0.5f;
- vertex[2].y = roundf(prim->bounds.y1) - 0.5f;
- vertex[3].x = roundf(prim->bounds.x1) - 0.5f;
- vertex[3].y = roundf(prim->bounds.y1) - 0.5f;
+ vertex[0].x = prim->bounds.x0 - 0.5f;
+ vertex[0].y = prim->bounds.y0 - 0.5f;
+ vertex[1].x = prim->bounds.x1 - 0.5f;
+ vertex[1].y = prim->bounds.y0 - 0.5f;
+ vertex[2].x = prim->bounds.x0 - 0.5f;
+ vertex[2].y = prim->bounds.y1 - 0.5f;
+ vertex[3].x = prim->bounds.x1 - 0.5f;
+ vertex[3].y = prim->bounds.y1 - 0.5f;
float width = prim->bounds.x1 - prim->bounds.x0;
float height = prim->bounds.y1 - prim->bounds.y0;