diff options
Diffstat (limited to 'perl-install/Xconfig')
-rw-r--r-- | perl-install/Xconfig/resolution_and_depth.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm index 75639d9d0..816af1916 100644 --- a/perl-install/Xconfig/resolution_and_depth.pm +++ b/perl-install/Xconfig/resolution_and_depth.pm @@ -66,6 +66,13 @@ sub size2default_resolution { $monitorSize2resolution{round($size)} || ($size < 13 ? "640x480" : "1600x1200"); } +sub to_string { + my ($resolution) = @_; + $resolution or return; + + sprintf("%sx%s %dbpp", @$resolution{'X', 'Y', 'Depth'}); +} + sub allowed { my ($card) = @_; @@ -280,7 +287,7 @@ sub choose_gtk { $x_res_combo->entry->set_text($chosen_x_res . "x" . $x_res2y_res{$chosen_x_res}); $W->main or return; - { X => $chosen_x_res, Depth => $chosen_Depth }; + first(grep { $_->{X} == $chosen_x_res && $_->{Depth} == $chosen_Depth } @resolutions); } 1; |