summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/various.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-31 22:32:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-31 22:32:10 +0000
commit2c2ac91cdc7f1bd86dfd222fc8edeb4edea46a5d (patch)
tree9fb1eefecfd5f9940fb7d5bf92fe99f4f3f528d3 /perl-install/Xconfig/various.pm
parent157a01642c2a988c3308d7d3dd0f8ba36a0cf641 (diff)
downloaddrakx-2c2ac91cdc7f1bd86dfd222fc8edeb4edea46a5d.tar
drakx-2c2ac91cdc7f1bd86dfd222fc8edeb4edea46a5d.tar.gz
drakx-2c2ac91cdc7f1bd86dfd222fc8edeb4edea46a5d.tar.bz2
drakx-2c2ac91cdc7f1bd86dfd222fc8edeb4edea46a5d.tar.xz
drakx-2c2ac91cdc7f1bd86dfd222fc8edeb4edea46a5d.zip
- add non-wizard ability to XFdrake
- first part of ATI TVout support (still needs patching initscript, and adding an entry in bootloader) (and testing of course :)
Diffstat (limited to 'perl-install/Xconfig/various.pm')
-rw-r--r--perl-install/Xconfig/various.pm51
1 files changed, 51 insertions, 0 deletions
diff --git a/perl-install/Xconfig/various.pm b/perl-install/Xconfig/various.pm
index dea93439b..0089acd30 100644
--- a/perl-install/Xconfig/various.pm
+++ b/perl-install/Xconfig/various.pm
@@ -42,6 +42,13 @@ sub info {
"$title\n\n$info";
}
+sub various {
+ my ($in, $card, $options, $auto) = @_;
+
+ tvout($in, $card, $options);
+ choose_xdm($in, $auto);
+}
+
sub choose_xdm {
my ($in, $auto) = @_;
my $xdm = $::isStandalone ? any::runlevel($::prefix) : 1;
@@ -56,4 +63,48 @@ Would you like XFree to start when you reboot?"), $xdm) or return
any::runlevel($::prefix, $xdm ? 5 : 3);
}
+sub tvout {
+ my ($in, $card, $options) = @_;
+
+ $card->{FB_TVOUT} && Xconfig::card::using_xf4($card) && $options->{allowFB} or return;
+
+ $in->ask_yesorno('', _("Your graphic card seems to have a TV-OUT connector.
+It can be configured to work using frame-buffer.
+
+For this you have to plug your graphic card to your TV before booting your computer.
+Then choose the \"TVout\" entry in the bootloader
+
+Do you have this feature?")) or return;
+
+ my $norm = $in->ask_from_list('', _("What norm is your TV using?"), [ 'NTSC', 'PAL' ]) or return;
+
+ configure_FB_TVOUT({ norm => $norm });
+}
+
+sub configure_FB_TVOUT {
+ my ($use_FB_TVOUT) = @_;
+
+ my $raw_X = Xconfig::default::configure();
+ my $xfree4 = $raw_X->{xfree4};
+
+ $xfree4->set_monitors({ HorizSync => '30-50', VertRefresh => ($use_FB_TVOUT->{norm} eq 'NTSC' ? 60 : 50) });
+ $xfree4->set_devices({ Driver => 'fbdev' });
+
+ my ($device) = $xfree4->get_devices;
+ my ($monitor) = $xfree4->get_monitors;
+ $xfree4->set_screens({ Device => $device->{Identifier}, Monitor => $monitor->{Identifier} });
+
+ $xfree4->write("$::prefix/etc/X11/XF86Config-4.tvout");
+
+ check_XF86Config_symlink();
+}
+
+sub check_XF86Config_symlink {
+ my $f = "$::prefix/etc/X11/XF86Config-4";
+ if (!-l $f && -e "$f.tvout") {
+ rename $f, "$f.standard";
+ symlink "XF86Config-4.standard", $f;
+ }
+}
+
1;