summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/resolution_and_depth.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/Xconfig/resolution_and_depth.pm')
-rw-r--r--perl-install/Xconfig/resolution_and_depth.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm
index 816af1916..500b431c1 100644
--- a/perl-install/Xconfig/resolution_and_depth.pm
+++ b/perl-install/Xconfig/resolution_and_depth.pm
@@ -125,9 +125,14 @@ sub filter_using_HorizSync {
sub choose {
my ($in, $default_resolution, @resolutions) = @_;
- $in->ask_from_listf(_("Resolutions"), "",
- sub { "$_[0]{X}x$_[0]{Y} $_[0]{Depth}bpp" },
- \@resolutions, $default_resolution || {});
+ my $resolution = $default_resolution || {};
+ $in->ask_from(_("Resolutions"), "",
+ [ {
+ val => \$resolution, type => 'list', sort => 0,
+ list => [ sort { $a->{X} <=> $b->{X} } @resolutions ],
+ format => sub { "$_[0]{X}x$_[0]{Y} $_[0]{Depth}bpp" },
+ } ])
+ and $resolution;
}