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 if the system display scale is at 100% or 2.f if the scale is at 200%
If I change this scale while the game is running the SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will happen, but the result from SDL_GetDisplayContentScale won't update. If I trigger SDL_EVENT_WINDOW_RESIZED by manually resizing the window it will refresh the scale correctly.
Is this a bug or I'm doing something wrong?
The text was updated successfully, but these errors were encountered:
I'm using
SDL_GetDisplayContentScale
to get the scale I should use for the UI in my game like this:float scale_factor = SDL_GetDisplayContentScale(SDL_GetDisplayForWindow(window));
In this case
scale_factor
will be1.f
if the system display scale is at 100% or2.f
if the scale is at 200%If I change this scale while the game is running the
SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED
event will happen, but the result fromSDL_GetDisplayContentScale
won't update. If I triggerSDL_EVENT_WINDOW_RESIZED
by manually resizing the window it will refresh the scale correctly.Is this a bug or I'm doing something wrong?
The text was updated successfully, but these errors were encountered: