@@ -63,6 +63,7 @@ void init_parse_options(int argc, char **argv)
6363 opt .font = NULL ;
6464 opt .max_height = opt .max_width = UINT_MAX ;
6565
66+ opt .zoom_rate = M_LN2 / 128.0 ;
6667 opt .step_rate = M_LN2 / 3.0 ;
6768
6869 opt .start_list_at = NULL ;
@@ -395,6 +396,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
395396 {"bg-center" , 0 , 0 , OPTION_bg_center },
396397 {"bg-scale" , 0 , 0 , OPTION_bg_scale },
397398 {"zoom" , 1 , 0 , OPTION_zoom },
399+ {"zoom-rate" , 1 , 0 , OPTION_zoom_rate },
398400 {"zoom-step" , 1 , 0 , OPTION_zoom_step },
399401 {"no-screen-clip" , 0 , 0 , OPTION_no_screen_clip },
400402 {"index-info" , 1 , 0 , OPTION_index_info },
@@ -845,10 +847,18 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
845847 case OPTION_window_id :
846848 opt .x11_windowid = strtol (optarg , NULL , 0 );
847849 break ;
850+ case OPTION_zoom_rate :
851+ opt .zoom_rate = atof (optarg );
852+ if ((opt .zoom_rate <= 0 )) {
853+ weprintf ("Zoom mode disabled due to --zoom-rate=%f" , opt .zoom_rate );
854+ } else {
855+ opt .zoom_rate = M_LN2 / opt .zoom_rate ;
856+ }
857+ break ;
848858 case OPTION_zoom_step :
849859 opt .step_rate = atof (optarg );
850860 if ((opt .step_rate <= 0 )) {
851- weprintf ("Zooming disabled due to --zoom-step=%f" , opt .step_rate );
861+ weprintf ("Zoom steps disabled due to --zoom-step=%f" , opt .step_rate );
852862 } else {
853863 opt .step_rate = M_LN2 / opt .step_rate ;
854864 }
0 commit comments