-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Hidpi support in X11 #4176
Comments
I can't find clear guidance on what needs to be done for this. Was this all built at the Gnome and KDE level, and toolkits talking directly to X11 are out of luck? I assume we need a way to broadcast "we can cooperate in a HiDPI environment" to the system and then report correct (scaled) values for window size, mouse coordinates, SDL_GL_GetDrawableSize, etc. but I need information on how this works in current times at the X11 level. |
I think it is done at the toolkit level with a user option, eg GNOME/GTK3 has a dconf setting, Qt and GTK2 have environment variables. In theory you should be able to query the X server to at least be able to calculate the DPI and decide on appropriate scaling, but the information can be highly unreliable. For example, ISTR my previous TV, a Sony, reported its dimensions as 16m x 9m! I don't suppose you'd want to link SDL with dconf, so having its own environment variable would probably be the best way forwards. |
This is now implemented for SDL 3.0. |
The X11 backend doesn't seem to support hidpi yet, but Wayland does. It would be useful if SDL could support hidpi on X11, because there there are lots of obstacles to gamers adopting Wayland, including #3739.
The text was updated successfully, but these errors were encountered: