From 5ed51c93f747126b7ce54ead783e40f65cf25282 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 19 Jun 2017 18:18:03 +0100 Subject: Reenable use of F3 to set video resolution in isolinux bootloader. This is one part of a fix for mga#20624. F3 has not had any effect since commit 4ca721b1fe6022c985ab7b10d1bea36f657c28b3. This is not a simple revert, as we now want it to optionally override any vga= setting in the selected boot command line. --- src/common.inc | 11 ++++++++++- src/dia_video.inc | 22 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/common.inc b/src/common.inc index 354ca04..38c93b8 100644 --- a/src/common.inc +++ b/src/common.inc @@ -367,6 +367,16 @@ bc.cmd exch .inp_buf get strcat " " strcat pop + syslinux { + % add video mode if selected + video.modes.list xmenu.video .xm_current get get + dup 0 gt { + "vga=%d " bc.cmd dup length add sprintf + } { + pop + } ifelse + } if + % remove all but last 'vga' & 'initrd' options [ "vga" "initrd" ] dup { { @@ -1442,4 +1452,3 @@ config.welcome 0 eq or % check for bi-arch config check_arch_boot_dir - diff --git a/src/dia_video.inc b/src/dia_video.inc index 6e7f16d..1bcc512 100644 --- a/src/dia_video.inc +++ b/src/dia_video.inc @@ -9,9 +9,23 @@ % Some global vars. % % video mode array fields -/video.default 2 def +/video.default 0 def /video.modes.list [ 0 785 788 791 ] def -/video.modes.text [ "Text" "640 x 480" "800 x 600" "1024 x 768" ] def +/video.modes.text [ /txt_kernel_default "640 x 480" "800 x 600" "1024 x 768" ] def + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Get title string to be displayed on panel +% +% ( ) ==> ( title ) +% +/video.title { + xmenu.video .xm_current get + dup 0 eq { + pop /txt_video_mode + } { + video.modes.text exch get + } ifelse +} def % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % Build video mode list. @@ -24,8 +38,8 @@ /xmenu xmenu.video def xmenu .xm_list video.modes.text put - xmenu .xm_title .undef put xmenu .xm_current video.default put + xmenu .xm_title /txt_video_mode put } def @@ -37,6 +51,8 @@ /video.update { /xmenu xmenu.video def + xmenu .xm_title video.title put + /window.action actRedrawPanel def } def -- cgit v1.2.1