Closed Etaash-mathamsetty closed 2 years ago
why the hell is it reporting a lower dpi for 200% scale vs 100%?????
SDL has separate APIs for determining DPI scale and pixels versus DPI-scaled units, for what it's worth. (SDL_GetWindowSize
for dpi-scaled units, and SDL_GetRendererOutputSize
or SDL_GL_GetDrawableSize
or SDL_Vulkan_GetDrawableSize
or SDL_Metal_GetDrawableSize
for raw pixels depending on what API you're using.) Although I believe the x11 backend doesn't support highdpi / DPI scaling awareness.
those methods should be used by the getDPI function lol
yeah that method works pretty well
Reopened so @icculus can look at what SDL_GetDisplayDPI()
is doing on Linux
In theory this got fixed in https://github.com/libsdl-org/SDL/commit/ec0204d2438829b18d5942b93713dfd00682121c ... @Etaash-mathamsetty, can you recheck?
In theory this got fixed in ec0204d ... @Etaash-mathamsetty, can you recheck?
I forgot to mention that I was testing on wayland, so it would be nice if you updated it for wayland too
In theory this got fixed in ec0204d ... @Etaash-mathamsetty, can you recheck?
unfortunately still broken under xorg and wayland edit: I linked it statickly and SDL2.so does not show up with ldd, so it's probably still broken
I think Wayland has always done this correctly, it was our x11 code that did not.
Perhaps your display is reporting a bogus EDID value...?
Going to add documentation to warn about this function and then I'll close.
is there any way to fix it, I have been looking for hours at this point, seems to work for everyone else but me :(