API to provide info on the monitor in use
André Timmermans (100) 655 posts |
I am currently modifying KinoAmp to provide pan & scan to 4:3 or 16:9, but it would be best to be able to pan & scan to the aspect ratio of the monitor since there are a lot of possibilities (4:3, 16:9, 16:10, 2.21:1, …). My immediate usage case for an API is to obtain aspect ratio information on the monitor used or maybe its preferred resolution (assuming square pixels). For multiple displays, display selection tools could offer info such as name and (prefered/current?) resolution for each possible display. |
Chris Hall (132) 3554 posts |
Surely this already exists in the form of EDID support? The screen resolution is then set to the native resolution of the display. KinoAmp then knows the screen resolution. Or am I missing something? |
Jeffrey Lee (213) 6048 posts |
There’s a lot of information in the EDID which ScreenModes currently ignores/throws away:
You can get the monitor’s preferred mode from Service_MonitorLeadTranslation, but there’s always the possibility that something else is overriding the result, so a way of getting it directly from ScreenModes might be desirable (and at some point I’d expect ScreenModes to make sure the mode returned by Service_MonitorLeadTranslation is actually supported by the video hardware, so in the future it might not always be the monitor’s preferred mode that’s returned) |