-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lvgl/contrib: allow for SDL display driver height/width to be adjusted #18463
lvgl/contrib: allow for SDL display driver height/width to be adjusted #18463
Conversation
5e29cee
to
6dcf0b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. Code change looks good to me. I sadly have a 64 bit only distro and running SDL from within docker is not trivial, so I cannot easily test this. But I guess I can just trust your testing.
If you agree to drop the addition of the white space at an unrelated function, please squash right in. Otherwise I'd merge as is.
Would you mind squashing the two commits into one? You can do so e.g. using
and then replace (And finally a |
1db919a
to
55681ff
Compare
fixed - thanks for the pointer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like something went wrong during squashing. You could add the semicolons locally and commit with --amend
to directly add this into the current commit. A git push --force-with-lease
is again needed to push the changed history into the PR.
Head branch was pushed to by a user without write access
55681ff
to
ec27956
Compare
Enables the SDL driver for LVGL to utilize a user prescribed width/height for display resolution when utilizing SDL, or rely on the SDL_HOR/VER_RES provided by lv_drv_conf.h in lv_drivers
ec27956
to
4831fd6
Compare
Thx for your contribution and congratulations for your first PR merged :) I almost forget this during the excitement of the annual RIOT summit |
Contribution description
When running a RIOT native app using SDL, the display window for SDL is adjustable, but the display driver used by LVGL is not - it always defaults to the 320x240 size provided in the lv_disp_drv_init.
When driving an LCD, the resolution for the disp driver is updated post-init of the driver. Following the similar conventions, this tidbit references LCD_SCREEN_HEIGHT/WIDTH defines, which can be passed to an app as a CFLAG in a Makefile.include, or defaulting to the SDL_HOR/VER_RES defines passed in through lv_drv_conf.h in lv_drivers package.
This enables SDL native applications to better emulate the exact resolution of an LCD screen.
Testing procedure
Using a test package for a custom LVGL RIOT application, I verified that SDL_HOR/VER_RES can adjust the SDL window, but not the display driver used by LVGL when driving an SDL window.
No other defines provided by lv_conf.h, lv_drv_conf.h, or lvgl_riot_conf.h adjust the size of the SDL emulated display driven by LVGL. The simplest fix to me was to adjust the size of the display driver post-init as is done for the non-SDL display driver. This fix enables the emulated display size to be adjusted
Issues/PRs references
Resolves issue #18461