diff --git a/Core/Core.cpp b/Core/Core.cpp index 36486d9670..44caf06911 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -151,7 +151,7 @@ bool UpdateScreenScale(int width, int height) { smallWindow = IsWindowSmall(width, height); if (smallWindow) { - g_dpi /= 2; + g_dpi /= 2.0f; g_dpi_scale *= 2.0f; } pixel_in_dps = 1.0f / g_dpi_scale; diff --git a/ext/native/gfx_es2/draw_text.cpp b/ext/native/gfx_es2/draw_text.cpp index 387e5fa564..a081da4073 100644 --- a/ext/native/gfx_es2/draw_text.cpp +++ b/ext/native/gfx_es2/draw_text.cpp @@ -351,6 +351,7 @@ void TextDrawer::DrawString(DrawBuffer &target, const char *str, float x, float void TextDrawer::RecreateFonts() { for (auto &iter : fontMap_) { + iter.second->dpiScale = dpiScale_; iter.second->Create(); } }