mickelson / sfml-pi

SFML on Linux without X11 using DRM/KMS (or dispmanx on RPi0-3)
Other
62 stars 26 forks source link

add SFML_DRM_REFRESH support to request specifc vrefresh for a mode if multiple exists #16

Closed joyrider3774 closed 4 years ago

joyrider3774 commented 4 years ago

SFML_DRM_REFRESH can be used in combination with SFML_DRM_MODE to request a specific refresh rate if multiple exists for the same requested mode, by default when only using SFML_DRM_MODE it would take the first mode found without a way to specify requested refresh rate. if SFML_DRM_REFRESH is not specified 0 is used as before.

I also added a small printf statement to printout the actual mode used in DRM mode.

mickelson commented 4 years ago

This looks fine but could you take out the printf please? The library should not output anything to the console on normal operation when there is no error.

If you really want the console debug output (and I certainly can see it being useful in various circumstances), you could make it so that it will only happen if for example the "SFML_DRM_DEBUG" environment variable is set... I know from experience with the RPI branch that users want to be able to suppress all console output when they run attract-mode for example.

Andrew

joyrider3774 commented 4 years ago

i added the SFML_DRM_DEBUG check as i can see it being usefull as well to be able to see the drm mode and refresh rate used