diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index 0a0470eff..42b364699 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -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; } diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index d5a0483c3..d82aa3f41 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -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;