mirror of https://github.com/libsdl-org/SDL.git
Don't divide by the scale twice
It's already been done in GetUIScreenModeSize(), in the last commit
This commit is contained in:
parent
6aef14fb2d
commit
c45a0cd9b3
|
|
@ -135,16 +135,15 @@ static int UIKit_AddSingleDisplayMode(SDL_VideoDisplay *display, int w, int h,
|
|||
UIScreen *uiscreen, UIScreenMode *uiscreenmode)
|
||||
{
|
||||
SDL_DisplayMode mode;
|
||||
float scale = uiscreen.nativeScale;
|
||||
|
||||
SDL_zero(mode);
|
||||
if (UIKit_AllocateDisplayModeData(&mode, uiscreenmode) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
mode.w = w / scale;
|
||||
mode.h = h / scale;
|
||||
mode.pixel_density = scale;
|
||||
mode.w = w;
|
||||
mode.h = h;
|
||||
mode.pixel_density = uiscreen.nativeScale;
|
||||
mode.refresh_rate = UIKit_GetDisplayModeRefreshRate(uiscreen);
|
||||
mode.format = SDL_PIXELFORMAT_ABGR8888;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue