From ae5336a3d2ef16c02fdafa42fae6b133f1f93d8d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 19 Aug 2021 14:03:10 +0200 Subject: [PATCH] Fixed bug #4669: D3D_QueueGeometry: -0.5f offset position of vertexs This similar to D3D_QueueCopy positions --- src/render/direct3d/SDL_render_d3d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index 34fb485a5..f4d06f5a7 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);