aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-05 21:15:08 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-05 21:15:08 +0000
commitb8976522a76ec76affce76d785f74b0ba3fda332 (patch)
tree1ff3873ecb331d564ba2768323b1c039a8d99729
parentb6b9b5084fc482df71b020897453e63f55ec2726 (diff)
downloadimv-b8976522a76ec76affce76d785f74b0ba3fda332.tar.gz
Don't scale image
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index b4fae06..8d129f4 100644
--- a/main.c
+++ b/main.c
@@ -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);
}