Runtime screen resolution setting

Hi. I think LVGL can be forced to get screen resolution in runtime (i.e. for fbdev device on custom screen for Raspberry Pi or any other devices). I think it can be done by something like that in lvgl.h:
#if !defined(LV_HOR_RES) && !defined(LV_VER_RES) && defined(LV_DYN_RES)
extern int LV_HOR_RES;
extern int LV_VER_RES;
#endif
This feature should not break existing builds because it can be switched off.

It is already possible in LVGL V7.X.X

1 Like

Is it possible to make the same thing for LV_DPI?

I can’t imagine how DPI can be changed in real world of physical display…

But anyway… still you may have some local static variable in your display driver and according to its value for example modify resolution of the display driver.

OK, thanks.

If you want for example by modifying DPI/ Display resolution to update sizes of object, so no. As I know, LVGL will not update it automatically. LV_DPI macro is used as I know for some default values/ basic initialization.

So you will need to update parameters of all objects manually (except objects with enabled auto size feature)

I need to modify it because I need to build Android/CWM app. Something like AROMA Installer (abandoned project).