Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
I think this fixes the texture pixel alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 19, 2009
1 parent f8d3d42 commit daf95ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/video/win32/SDL_d3drender.c
Expand Up @@ -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;
Expand Down

0 comments on commit daf95ac

Please sign in to comment.