I feel like in theory handling DPI/scaling is pretty straight forward. A scale between UI coordinates and pixel coordinates. Great.

But in practice you never know what APIs work in what coordinates and what different scale values actually mean because they try to abstract things, and you end up with lovely stuff like this. (Also I'm currently on Linux.)

A table that describes what different SDL calls return for different platforms. The calls are SDL_GetWindowSize, SDL_GetWindowSizeInPixels, SDL_GetDisplayContentScale, SDL_GetWindowDisplayScale, SDL_GetWindowPixelDensity. The sizes returned vary between 1920x1080 and 3840x2160 for Mac and Windows, with  SDL_WINDOW_HIGH_PIXEL_DENSITY enabled or not. The scales are 1.0 for some calls and 2.0 for some, different on the different platforms.
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.gamedev.place/users/SonnyBonds/statuses/115662907687851936 on your instance and quote it. (Note that quoting is not supported in Mastodon.)