Kodi Community Forum

Full Version: Display mode's Resolution override - advancedsettings.xml
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Some devices has settings that do not match the resolution of the display panel.
I've discussed this earlier in forum. LINK
In my case, I have wrong mode resolution(720p) and the correct size of a screen(1080p) so I need to override the mode resolution..

https://github.com/xbmc/xbmc/blob/e0520c...ls.cpp#L84

from the line 84 to 105

m.getPhysicalWidth() to custom_width="1920"
m.getPhysicalHeight() to custom_height="1080"

https://github.com/xbmc/xbmc/blob/e0520c...s.cpp#L163
I tried getting resolution from sys.display-size(1920x1080) and split with x. For some reason, the stutter occurred. I don't know why
my code here

So I just changed /// m.getPhysicalWidth() to 1920; and others /// and compiled.  It works okay so far.

Maybe it goes like,
s_res_cur_displayMode.iWidth = s_res_cur_displayMode.iScreenWidth = custom_width;
s_res_cur_displayMode.iHeight = s_res_cur_displayMode.iScreenHeight = custom_height;
res.iWidth = res.iScreenWidth = custom_width;
res.iHeight = res.iScreenHeight = custom_height;

I realized that overriding mode resolution is better than skipping modes and get resolution from the displaysize when mode settings are available.
Cuz it contains HDR infos and refreshrates.

Thanks in advance Smile
we have already widely discussed and your solution is take a good display brand or keep it as is with your broken firmware

what you suggest is a hack
you want overwriting resolution data from android API without know the supported refresh rates for that display
this can lead to wider problems
and i think it is not appropriate to have these responsibilities over device users
(2022-09-05, 18:58)CastagnaIT Wrote: [ -> ]we have already widely discussed and your solution is take a good display brand or keep it as is with your broken firmware

what you suggest is a hack
you want overwriting resolution data from android API without know the supported refresh rates for that display
this can lead to wider problems
and i think it is not appropriate to have these responsibilities over device users
- you want overwriting resolution data from android API without know the supported refresh rates for that display
It is basically to override only width and height of the reported mode information so supported resfresh rates and HDR info are still available.

If mode data exist and sys.display-size is bigger than the mode size
then, overwrite mode's width and height with the value taken from sys.display-size
like creating new mode.

Since this is an advanced setting, the person who uses this setting is ready to take risks. ;-; 😭