diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2015-11-05 21:15:08 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2015-11-05 21:15:08 +0000 |
commit | b8976522a76ec76affce76d785f74b0ba3fda332 (patch) | |
tree | 1ff3873ecb331d564ba2768323b1c039a8d99729 | |
parent | b6b9b5084fc482df71b020897453e63f55ec2726 (diff) | |
download | imv-b8976522a76ec76affce76d785f74b0ba3fda332.tar.gz |
Don't scale image
-rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -84,7 +84,10 @@ int main(int argc, char** argv) SDL_RenderClear(renderer); if(img) { - SDL_Rect area = {0,0,width,height}; + int img_w, img_h, img_access; + unsigned int img_format; + SDL_QueryTexture(img, &img_format, &img_access, &img_w, &img_h); + SDL_Rect area = {0,0,img_w,img_h}; SDL_RenderCopy(renderer, img, &area, &area); } |