1 /* testapp for aspect.[ch] by Atmos
2 * gcc aspecttest.c aspect.c -o aspecttest -DASPECT_TEST [-DASPECT_DEBUG]
10 /* default zoom state 0 off, 1 on */
13 extern float monitor_aspect
;
17 int main(int argc
, char *argv
[]) {
19 //printf("argc: %d\n",argc);
24 monitor_aspect
= (float)atoi(argv
[7])/(float)atoi(argv
[8]);
26 aspect_save_prescale(atoi(argv
[5]),atoi(argv
[6]));
27 printf("prescale size: %sx%s\n",argv
[5],argv
[6]);
29 aspect_save_screenres(atoi(argv
[1]),atoi(argv
[2]));
30 printf("screenres: %sx%s\n",argv
[1],argv
[2]);
31 aspect_save_orig(atoi(argv
[3]),atoi(argv
[4]));
32 printf("original size: %sx%s\n",argv
[3],argv
[4]);
33 w
=atoi(argv
[3]); h
=atoi(argv
[4]);
36 printf("USAGE: %s <screenw> <screenh> <origw> <origh>\n[<prescalew> "
37 "<prescaleh>] [<screenaspectw> <screenaspecth>] [<zoom 0/1>]\n",
41 printf("monitor_aspect: %f\n",monitor_aspect
);
43 printf("new size: %dx%d\n",w
,h
);