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)
|
UIScreen *uiscreen, UIScreenMode *uiscreenmode)
|
||||||
{
|
{
|
||||||
SDL_DisplayMode mode;
|
SDL_DisplayMode mode;
|
||||||
float scale = uiscreen.nativeScale;
|
|
||||||
|
|
||||||
SDL_zero(mode);
|
SDL_zero(mode);
|
||||||
if (UIKit_AllocateDisplayModeData(&mode, uiscreenmode) < 0) {
|
if (UIKit_AllocateDisplayModeData(&mode, uiscreenmode) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mode.w = w / scale;
|
mode.w = w;
|
||||||
mode.h = h / scale;
|
mode.h = h;
|
||||||
mode.pixel_density = scale;
|
mode.pixel_density = uiscreen.nativeScale;
|
||||||
mode.refresh_rate = UIKit_GetDisplayModeRefreshRate(uiscreen);
|
mode.refresh_rate = UIKit_GetDisplayModeRefreshRate(uiscreen);
|
||||||
mode.format = SDL_PIXELFORMAT_ABGR8888;
|
mode.format = SDL_PIXELFORMAT_ABGR8888;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue