--- a/src/ui.c Thu Jul 31 22:14:27 2025 +0200 +++ b/src/ui.c Fri Aug 01 17:57:39 2025 +0200 @@ -31,6 +31,8 @@ #include "ascension/context.h" #include "ascension/scene.h" +#include <math.h> + void asc_ui_add_node(AscSceneNode *node) { asc_scene_add_node(&asc_active_window->ui, node); } @@ -45,14 +47,7 @@ float asc_ui_scale_auto(void) { const asc_vec2u res = asc_window_display_resolution(); - float scale; - if (res.width > 3100) { - scale = 2.0f; - } else if (res.width > 2000) { - scale = 1.5f; - } else { - scale = 1.f; - } + float scale = roundf((float)res.height / 108.f) / 10.f; asc_ui_scale(scale); return scale; }