libresman

changeset 4:eadf99551730

ok *now* I really fixed the aspect issue
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 31 Jan 2014 16:32:02 +0200
parents a396d43a62f9
children bd9b4ff19c93
files examples/imgthumbs/src/main.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/examples/imgthumbs/src/main.c	Fri Jan 31 05:15:18 2014 +0200
     1.2 +++ b/examples/imgthumbs/src/main.c	Fri Jan 31 16:32:02 2014 +0200
     1.3 @@ -29,13 +29,13 @@
     1.4  
     1.5  int main(int argc, char **argv)
     1.6  {
     1.7 +	glutInitWindowSize(1024, 768);
     1.8  	glutInit(&argc, argv);
     1.9  
    1.10  	if(argv[1]) {
    1.11  		path = argv[1];
    1.12  	}
    1.13  
    1.14 -	glutInitWindowSize(800, 600);
    1.15  	glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
    1.16  	glutCreateWindow("imgthumbs");
    1.17  
    1.18 @@ -81,7 +81,7 @@
    1.19  
    1.20  		glScalef(show_zoom, show_zoom, 1);
    1.21  		glTranslatef(2.0 * show_pan_x, 2.0 * show_pan_y, 0);
    1.22 -		if(show_thumb->aspect >= 1.0) {
    1.23 +		if(show_thumb->aspect >= win_aspect) {
    1.24  			glScalef(1, 1.0 / show_thumb->aspect, 1);
    1.25  		} else {
    1.26  			glScalef(show_thumb->aspect / win_aspect, 1.0 / win_aspect, 1);