You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think in case none of the resolutions supported by connected monitor matches exactly the value of --screen-mode, I think it might be better to anyway select one of the resolutions that is the closest one to the requested one and use it instead of crashing?
Eg, if user requests --screen-mode 1920x1080@60 but the supported resolutions are
pixelpilot should select the closest one, eg, 1920x1080@24.
The way heuristics may work is by finding the minimum of the abs( (mode_width - hdisplay) + (mode_height - hdisplay) + (mode_vrefresh - vrefresh) ) here
Or it might be not the best idea actually - to give user not what they explicitly asked. Given that we already have "flexible" solution: if --screen-mode is not provided, pixelpilot selects the 1st resolution that it detects...
I think the --screen-mode setting should be determined by the PixelPilot_rk startup script. Imagine that when I set a resolution, the program starts normally, but the resolution is not what I set. This is very strange. Generally, when passing unsupported parameters to a program, the program should give a prompt that it does not support the parameter, rather than trying to correct it.
I think in case none of the resolutions supported by connected monitor matches exactly the value of
--screen-mode
, I think it might be better to anyway select one of the resolutions that is the closest one to the requested one and use it instead of crashing?Eg, if user requests
--screen-mode 1920x1080@60
but the supported resolutions arepixelpilot should select the closest one, eg, 1920x1080@24.
The way heuristics may work is by finding the minimum of the
abs( (mode_width - hdisplay) + (mode_height - hdisplay) + (mode_vrefresh - vrefresh) )
herePixelPilot_rk/src/drm.c
Lines 441 to 450 in 4579eda
The text was updated successfully, but these errors were encountered: