Fix guess best scale prompt showing up even when it guesses the default
Also fix a few warnings.
This commit is contained in:
parent
04b8378de4
commit
8534be2bf9
@ -388,9 +388,10 @@ int Main(int argc, char *argv[])
|
||||
engine.TouchUI = prefs.Get("TouchUI", DEFAULT_TOUCH_UI);
|
||||
if (Client::Ref().IsFirstRun() && FORCE_WINDOW_FRAME_OPS == forceWindowFrameOpsNone)
|
||||
{
|
||||
windowFrameOps.scale = GuessBestScale();
|
||||
if (windowFrameOps.scale)
|
||||
auto guessed = GuessBestScale();
|
||||
if (windowFrameOps.scale != guessed)
|
||||
{
|
||||
windowFrameOps.scale = guessed;
|
||||
prefs.Set("Scale", windowFrameOps.scale);
|
||||
showLargeScreenDialog = true;
|
||||
}
|
||||
|
@ -46,8 +46,8 @@ void SetTextInputRect(int x, int y, int w, int h)
|
||||
SDL_Rect rect;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 18)
|
||||
int wx, wy, wwx, why;
|
||||
SDL_RenderLogicalToWindow(sdl_renderer, x, y, &wx, &wy);
|
||||
SDL_RenderLogicalToWindow(sdl_renderer, x + w, y + h, &wwx, &why);
|
||||
SDL_RenderLogicalToWindow(sdl_renderer, float(x), float(y), &wx, &wy);
|
||||
SDL_RenderLogicalToWindow(sdl_renderer, float(x + w), float(y + h), &wwx, &why);
|
||||
rect.x = wx;
|
||||
rect.y = wy;
|
||||
rect.w = wwx - wx;
|
||||
|
Reference in New Issue
Block a user