Commit ae5336a3d2ef16c02fdafa42fae6b133f1f93d8d

Sylvain 2021-08-19T14:03:10

Fixed bug #4669: D3D_QueueGeometry: -0.5f offset position of vertexs This similar to D3D_QueueCopy positions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 34fb485..f4d06f5 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -1054,8 +1054,8 @@ D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t
         xy_ = (float *)((char*)xy + j * xy_stride);
         col_ = *(SDL_Color *)((char*)color + j * color_stride);
 
-        verts->x = xy_[0] * scale_x;
-        verts->y = xy_[1] * scale_y;
+        verts->x = xy_[0] * scale_x - 0.5f;
+        verts->y = xy_[1] * scale_y - 0.5f;
         verts->z = 0.0f;
         verts->color = D3DCOLOR_ARGB(col_.a, col_.r, col_.g, col_.b);