You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case scale_factor will be 1.f in (low resolution) mode or 2.f if the (Default) mode
If I change this scale while the game is running the SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will happen, but the pixel_density from SDL_GetDesktopDisplayMode won't update. Resizing the window won't help either, the only way of getting the right value is by closing and opening the game again.
Is this a bug or I'm doing something wrong?
In windows to get this same scale I have to use SDL_GetDisplayContentScale but in macos it always returns 1.f, it won't matter if you are in low res mode or high dpi, ¿Is this also a different bug or might be related to this issue?.
The text was updated successfully, but these errors were encountered:
I'm using
SDL_GetDesktopDisplayMode()->pixel_density
to get the scale I should use for the UI in my game like this:float scale_factor = SDL_GetDesktopDisplayMode(SDL_GetDisplayForWindow(window))->pixel_density;
In this case
scale_factor
will be1.f
in (low resolution) mode or2.f
if the (Default) modeIf I change this scale while the game is running the
SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED
event will happen, but thepixel_density
fromSDL_GetDesktopDisplayMode
won't update. Resizing the window won't help either, the only way of getting the right value is by closing and opening the game again.Is this a bug or I'm doing something wrong?
In windows to get this same scale I have to use
SDL_GetDisplayContentScale
but in macos it always returns1.f
, it won't matter if you are in low res mode or high dpi, ¿Is this also a different bug or might be related to this issue?.The text was updated successfully, but these errors were encountered: