Closed slightc closed 1 month ago
The docs says
window should be created in high-DPI mode if supported (>= SDL 2.0.1)
So it won't be used if not supported. Therefore I wonder if we can add it unconditionally.
I think that should be a config field, it is up to the user to decide on their own
The docs says
window should be created in high-DPI mode if supported (>= SDL 2.0.1)
So it won't be used if not supported. Therefore I wonder if we can add it unconditionally.
you mean like?
#if defined(SDL_HIGHDPI) && SDL_HIGHDPI && SDL_VERSION_ATLEAST(2, 0, 1)
flag |= SDL_WINDOW_ALLOW_HIGHDPI;
#endif
to https://github.com/lvgl/lv_drivers/blob/0091dc612facc94dce1061a9b78d641c77f1791a/sdl/sdl.c#L336
edit: nvm, i misread unconditionally as conditionally, my bad 😄
I think use SDL_HIGHDPI macro definition check, that should be defined by those in need, no need for additional version checking (want to keep simplicity).
The version check is internal and we need to add it only once. IMO it's simpler than having a new config option which is visible for all the users.
So if there is no objection and if it's not harmful I vote for adding SDL_HIGHDPI
(if the SDL version id high enough).
emm, that like this?
#ifndef SDL_HIGHDPI
# define SDL_HIGHDPI SDL_VERSION_ATLEAST(2, 0, 1)
#endif
#if SDL_HIGHDPI
flag |= SDL_WINDOW_ALLOW_HIGHDPI;
#endif
Or just:
#if SDL_VERSION_ATLEAST(2, 0, 1)
flag |= SDL_WINDOW_ALLOW_HIGHDPI;
#endif
@kisvegabor I'm update it, I think that may best can be force enable/disable by developer, so still use the SDL_HIGHDPI
, this PR maybe OK?
Could you add it to lvgl master
too?
309