aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config/output.c
diff options
context:
space:
mode:
authorLibravatar Carl Smedstad <carl.smedstad@protonmail.com>2022-12-30 08:50:14 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2023-01-03 21:50:56 +0100
commit9425ce2fba6dd643c240386901de370ac90cc337 (patch)
treeeece0cfb4e472de8809ea7a074336905c2767932 /sway/config/output.c
parentRemove redundant return statements (diff)
downloadsway-9425ce2fba6dd643c240386901de370ac90cc337.tar.gz
sway-9425ce2fba6dd643c240386901de370ac90cc337.tar.zst
sway-9425ce2fba6dd643c240386901de370ac90cc337.zip
Replace math functions that promote float to double
Diffstat (limited to 'sway/config/output.c')
-rw-r--r--sway/config/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 914cf6c4..e2e48e4c 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -257,7 +257,7 @@ static void set_mode(struct wlr_output *output, struct wlr_output_state *pending
257 // Not all floating point integers can be represented exactly 257 // Not all floating point integers can be represented exactly
258 // as (int)(1000 * mHz / 1000.f) 258 // as (int)(1000 * mHz / 1000.f)
259 // round() the result to avoid any error 259 // round() the result to avoid any error
260 int mhz = (int)round(refresh_rate * 1000); 260 int mhz = (int)roundf(refresh_rate * 1000);
261 261
262 if (wl_list_empty(&output->modes) || custom) { 262 if (wl_list_empty(&output->modes) || custom) {
263 sway_log(SWAY_DEBUG, "Assigning custom mode to %s", output->name); 263 sway_log(SWAY_DEBUG, "Assigning custom mode to %s", output->name);