Open steve6375 opened 2 years ago
No problem! Can return a value. You try again.
The input parameter may be wrong, and 0 is returned.
It still pauses if pager on is set. It should be compatible with grub4dos graphicsmode command and not display modes or pause
Pause does not affect the return value. I don't see any compatibility problems. Grub4dos can also work in graphical mode. Do not understand why to work in text mode?
This issue is when I want to find out what the current graphics mode is in a menu or batch file
In grub4dos the code is
graphicsmode ;; set /A mode=%@retval%
In grub4efi the code to get the current graphicsmode would need to be:
pager status > nul
set PSTAT=%@retval% > nul
pager off
graphicsmode > nul ;; set /A mode=%@retval% > nul
if %PSTAT%==1 pager on > nul
Do you see the problem?
For background color mode, batch files which use a background color like $[0x70]
e.g.
echo HELLO $[0x70]DAVE
grub4dos text mode WORKS grub4dos graphicsmode WORKS grub4efi text mode WORKS grub4efi graphicsmode <<< DOES NOT DISPLAY TEXT DAVE
"graphicsmode [--info] [MODE] [-1 | RANGE_X_RESOLUTION]", "Examples:\n" "graphicsmode (display graphic information)\n" "graphicsmode ;; set /A GMODE=%@retval% (get current mode)\n" "graphicsmode --info (Returns the currently supported graphics mode)\n" "graphicsmode -1 (auto select mode)\n" "graphicsmode -1 800 (switch to highest mode for 800 pixel width)\n" "graphicsmode -1 100:1000 (The highest mode available in the range of x = 100-1000)"
In addition, the background colors of G4E and G4D printed characters are consistent. BOOTX64.rar.txt
Looks good :-)
but help text is wrong
graphicsmode does not display information graphicmode --info does not return currently supported graphics mode These two are mixed up!
Also, I think under grub4efi, graphicsmode parameters also include Y_RESOLUTION ??
e.g. this works OK graphicsmode -1 1280 720 graphicsmode -1 1280 1024
(not sure about colour depth??)
grub4dos help
But still problem of compatability - e,g, a batch file which lists graphics modes and presents results to the user or a batch file which parses the output and picks only 800 or 1024 X-res modes to list to the user
Under grub4dos we would need to use vbeprobe but under grub4efi we would need to use graphicsmode --info ???
Please can also you add vbeprobe command to grub4efi (just call 'graphicmode --info') so vbeprobe will work in both modes? Also MODE should be in hex numbers (not decimal) so it is compatible with vbeprobe output if possible?
Uefi has no vbeprobe. He has his own format-- Info has listed all the parameters.
So we must have two different commands then to display supported modes depending on how we have booted??? This means we cannot use same batch code but must first detect how we have booted or if we are running grub4dos or grub4efi?
e.g.
!BAT
echo Display supported graphics modes...
pager on
if exist @uefi graphicsmode --info || vbeprobe
and documentation must say: If you want to display what graphics modes are supported then you must use the graphicsmode --info command if in uefi mode but you must use vbeprobe if in legacy mode.
Is that what you are saying?
yes. correct. Bios uses vbe, and uefi uses uga. I don't understand whether you want to detect the supported mode or recommend the supported mode to the customer? Batch processing seems impossible. When designing the graphical menu interface, I think the most important thing is the resolution that most computers generally support. Otherwise, the menu is either small or large.
also pauses if pager on is set.
vbeprobe command should display modes. graphicsmode should not display modes.