Changeset 1812


Ignore:
Timestamp:
04/21/12 02:43:08 (14 months ago)
Author:
philmoz
Message:

Fix subject distance override problems when setting infinity focus.
http://chdk.setepontos.com/index.php?topic=7993.msg84366#msg84366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_0/platform/generic/shooting.c

    r1739 r1812  
    10751075                s=shooting_get_near_limit_f(v,shooting_get_min_real_aperture(),get_focal_length(lens_get_zoom_point())); 
    10761076            } 
    1077             if (!conf.dof_use_exif_subj_dist) s+=shooting_get_lens_to_focal_plane_width(); 
     1077            if (!conf.dof_use_exif_subj_dist && (s != INFINITY_DIST)) 
     1078                s+=shooting_get_lens_to_focal_plane_width(); 
    10781079            lens_set_focus_pos(s);  
    10791080        } 
     
    12851286int shooting_get_subject_distance_override_value() 
    12861287{ 
    1287   return (conf.subj_dist_override_value < shooting_get_lens_to_focal_plane_width()?0:(conf.subj_dist_override_value - shooting_get_lens_to_focal_plane_width())); 
     1288    if (conf.subj_dist_override_value != INFINITY_DIST) 
     1289        return (conf.subj_dist_override_value < shooting_get_lens_to_focal_plane_width()?0:(conf.subj_dist_override_value - shooting_get_lens_to_focal_plane_width())); 
     1290    else 
     1291        return INFINITY_DIST; 
    12881292} 
    12891293 
Note: See TracChangeset for help on using the changeset viewer.