Acquiring the current MODE refresh rate
Jon Abbott (1421) 2651 posts |
Is there a way to determine the current MODE are fresh rate, other than counting VSync over a time period? Can one assume that if the Mode specifier returned via OS_ScreenMode 1 is a MODE number, it’s at the default refresh rate and if not the Mode Selector Block does specify the Hz? Now that we’ve started getting games that require 26bit modules running on the Pi, I’ve come across several that count VSync to determine the refresh rate and as ADFFS takes 1 sec after a MODE chnage to work out the Hz and then lock it to 50Hz, the game’s ensd up with the wrong refresh rate. As a consequence I need to know the refresh rate at Service_ModeChange and not have to kick off a VSync count. |
Jeffrey Lee (213) 6048 posts |
Unfortunately it doesn’t look like there’s an easy, sure-fire way to get the current refresh rate.
I guess one approach you could take is to replicate some of the logic the OS uses:
Once you’ve got the VIDC list you should be able to work out the refresh rate manually from the mode timings. |