From ecd63ace78914a0b4fcecd80c218822c78e08f4b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 19 Sep 2009 12:48:52 +0000 Subject: [PATCH] I think this fixes the texture pixel alignment --- src/video/win32/SDL_d3drender.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/win32/SDL_d3drender.c b/src/video/win32/SDL_d3drender.c index eab70ed4c..2ea8cc21f 100644 --- a/src/video/win32/SDL_d3drender.c +++ b/src/video/win32/SDL_d3drender.c @@ -1060,10 +1060,10 @@ D3D_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, data->beginScene = SDL_FALSE; } - minx = (float) dstrect->x; - miny = (float) dstrect->y; - maxx = (float) dstrect->x + dstrect->w; - maxy = (float) dstrect->y + dstrect->h; + minx = (float) dstrect->x - 0.5f; + miny = (float) dstrect->y - 0.5f; + maxx = (float) dstrect->x + dstrect->w - 0.5f; + maxy = (float) dstrect->y + dstrect->h - 0.5f; minu = (float) srcrect->x / texture->w; maxu = (float) (srcrect->x + srcrect->w) / texture->w;