OS/2, eCS & ArcaOS - Technical > Programming
Where does OS/2 store the screen resolution?
Martin Iturbide:
Hi
--- Quote from: Neil Waldhauer on July 02, 2023, 03:14:44 pm ---My main need was to work on a system that is not booted, and can't be booted to the desktop because of a wrong screen resolution. But my method doesn't work as well for the currently booted system, so I will be looking into DiveQueryCaps to do that better.
--- End quote ---
I still have no idea how to pull that off. As you said before, there should be someplace where the screen resolution is stored, so booting from an OS/2 USB Flash, you can query which resolution uses the OS/2 installed on the hard drive.
Regards
Jan-Erik Lärka:
The information is stored in C:\OS2\OS2.INI that you can specify instead of 'USER'.
As seen in Rexx Information:
'USER' The user INI file (usually C:\OS2\OS2.INI). This is the default.
'SYSTEM' The system INI file (usually C:\OS2\OS2SYS.INI).
'BOTH' For querying invocations, both the user and system INI files will be searched. For setting invocations, the user INI file will be written to.
Dave Yeo:
If running Panorama, "panoutil -s x:" where X: is the drive, seems to work fine. From drive W:.
--- Code: ---H:\tmp>panoutil -s d:
Status on drive d:
Custom resolution logic is enabled.
Use Native Resolution is disabled
No manual custom resolution is set.
No manual EDID is set.
No manual Desc Number is set
PM Resolution is set to: 1920x1200 @ 16777216 colors
H:\tmp>panoutil -s n:
Status on drive n:
Custom resolution logic is enabled.
Use Native Resolution is enabled
Manual custom resolution 1600x900 is set.
No manual EDID is set.
No manual Desc Number is set
PM Resolution is set to: 1600x900 @ 65536 colors
--- End code ---
N: is an eCS partition that hasn't been booted in years, IIRC, when I had a 1600x900 monitor.
Neil Waldhauer:
--- Quote from: Jan-Erik Lärka on July 02, 2023, 07:39:37 pm ---The information is stored in C:\OS2\OS2.INI that you can specify instead of 'USER'.
--- End quote ---
For the currently booted system, the call to SysINI fails. USER works, but C:\OS2\OS2.INI does not. Boot to some other drive, including a bootAble CD, and C:\OS2\OS2.INI works fine in SysINI.
If I extend my example above, it works well to set the resolution if C:\OS2\OS2.INI is substituted for USER and then I save the values for the new resolution. This is useful if a bad resolution is set on C:, preventing the presentation manager from displaying on the screen. I know there are other ways involving going to VGA and reinstalling the video driver, but this is more elegant.
Navigation
[0] Message Index
[*] Previous page
Go to full version