1 diff --git a/src/habak.c b/src/habak.c
2 index 69d1b6d..4c6b391 100644
5 @@ -111,6 +111,10 @@ Active by default.\n\
7 Inactive by default.\n\
9 +-mW -- Habak will be proportionally stretched to fill the screen horizontally.\n\
11 +Inactive by default.\n\
13 -ms -- Habak will be non-proportionally stretched to fill the screen.\n\
14 Overrides and can be overriden by \"-mp\".\n\
15 Inactive by default.\n\
16 @@ -206,6 +210,10 @@ for (i=1;i<argc;i++) {
18 template_habak.scale_art=MOD_SCALE;
20 + else if (!strcmp(argv[i],"-mW")) {
21 + d("parse width scale");
22 + template_habak.scale_art=MOD_SCALE_WIDTH;
24 else if (!strcmp(argv[i],"-ms")) {
26 template_habak.scale_art=MOD_SCALE_NOPROP;
27 @@ -404,6 +412,12 @@ switch (current_list_item->data.type) {
28 current_list_item->data.height=current_list_item->data.orig_height*yco;
29 current_list_item->data.x = (scr->width-current_list_item->data.width)/2;
30 current_list_item->data.y = (scr->height-current_list_item->data.height)/2;
31 + } else if (current_list_item->data.scale_art==MOD_SCALE_WIDTH) {
32 + xco=((double)scr->width/(double)current_list_item->data.orig_width);
34 + current_list_item->data.width=current_list_item->data.orig_width*xco;
35 + current_list_item->data.height=current_list_item->data.orig_height*yco;
36 + current_list_item->data.x = (scr->width-current_list_item->data.width)/2;
38 /* brzydkie skalowanie
39 * W sumie to mog³em je robiæ wcze¶niej, ale dorzucam je tutaj,
40 diff --git a/src/types.h b/src/types.h
41 index 07c69af..e152b3c 100644
45 #define MOD_NOCENTER 0
48 +#define MOD_SCALE_WIDTH 'W'
49 #define MOD_SCALE_NOPROP 's'
51 #define MOD_POSITION 'p'