|
|
@ -237,7 +237,10 @@ struct output_config *store_output_config(struct output_config *oc) {
|
|
|
|
|
|
|
|
|
|
|
|
static void set_mode(struct wlr_output *output, int width, int height,
|
|
|
|
static void set_mode(struct wlr_output *output, int width, int height,
|
|
|
|
float refresh_rate, bool custom) {
|
|
|
|
float refresh_rate, bool custom) {
|
|
|
|
int mhz = (int)(refresh_rate * 1000);
|
|
|
|
// Not all floating point integers can be represented exactly
|
|
|
|
|
|
|
|
// as (int)(1000 * mHz / 1000.f)
|
|
|
|
|
|
|
|
// round() the result to avoid any error
|
|
|
|
|
|
|
|
int mhz = (int)round(refresh_rate * 1000);
|
|
|
|
|
|
|
|
|
|
|
|
if (wl_list_empty(&output->modes) || custom) {
|
|
|
|
if (wl_list_empty(&output->modes) || custom) {
|
|
|
|
sway_log(SWAY_DEBUG, "Assigning custom mode to %s", output->name);
|
|
|
|
sway_log(SWAY_DEBUG, "Assigning custom mode to %s", output->name);
|
|
|
|