I have some SDL code that, before creating a Window and a Renderer, detects the display DPI using
SDL_GetDisplayDPI, to properly scale textures late on for different types of monitors (for instance my MacBook Pro's monitor returns a DPI of 258, while my external Dell monitor returns 93).
When I use 2 monitors,
SDL_GetNumVideoDisplays properly returns 2, but I couldn't find any function in SDL that would get me which monitor the window is running in, to call
SDL_GetDisplayDPI with the correct index, nor any way to detect when the window is dragged from one monitor to the other.
Is there a way to do those things in SDL, or is there a tutorial somewhere that would explain how to do that (hopefully in a platform-independent way)?